October 14, 2022

Judo: History, Theory, Practice

The meaning behind the Kodokan’s motto—“The Most Efficient Application of Strength,” as Jigoro Kano put it—consists of the following. Assume that a person’s strength is measured in some sort of units. An opponent’s strength is ten, yours is seven. If your opponent pushes you with all his might, you won’t be able remain standing, even if you resist with all your might. You’ll either fall or step back. This is opposing strength with strength. Read more

October 13, 2022


TIL about nb which is a command line and local web note-taking, bookmarking, archiving, knowledge base application. It is written in bash and even has a Go implementation.

October 12, 2022

Learning Namespaces: Unsharing is caring

Learning bits from Linux Containers the Hard Way workshop. Linux namespaces are spawned by using either the clone or unshare system calls. unshare command is a Bash wrapper to the unshare system call. $ unshare --help Usage: unshare [options] [<program> [<argument>...]] Run a program with some namespaces unshared from the parent. Options: -m, --mount[=<file>] unshare mounts namespace -u, --uts[=<file>] unshare UTS namespace (hostname etc) -i, --ipc[=<file>] unshare System V IPC namespace -n, --net[=<file>] unshare network namespace -p, --pid[=<file>] unshare pid namespace -U, --user[=<file>] unshare user namespace -C, --cgroup[=<file>] unshare cgroup namespace -T, --time[=<file>] unshare time namespace -f, --fork fork before launching <program> --map-user=<uid>|<name> map current user to uid (implies --user) --map-group=<gid>|<name> map current group to gid (implies --user) -r, --map-root-user map current user to root (implies --user) -c, --map-current-user map current user to itself (implies --user) --map-auto map users and groups automatically (implies --user) --map-users=<outeruid>,<inneruid>,<count> map count users from outeruid to inneruid (implies --user) --map-groups=<outergid>,<innergid>,<count> map count groups from outergid to innergid (implies --user) --kill-child[=<signame>] when dying, kill the forked child (implies --fork) defaults to SIGKILL --mount-proc[=<dir>] mount proc filesystem first (implies --mount) --propagation slave|shared|private|unchanged modify mount propagation in mount namespace --setgroups allow|deny control the setgroups syscall in user namespaces --keep-caps retain capabilities granted in user namespaces -R, --root=<dir> run the command with root directory set to <dir> -w, --wd=<dir> change working directory to <dir> -S, --setuid <uid> set uid in entered namespace -G, --setgid <gid> set gid in entered namespace --monotonic <offset> set clock monotonic offset (seconds) in time namespaces --boottime <offset> set clock boottime offset (seconds) in time namespaces -h, --help display this help -V, --version display version For more details see unshare(1). Read more

September 14, 2022

Bash Builtin Colon

: is a shell builtin command inherited from the Bourne Shell. It does nothing beyond expanding arguments and performing redirection and has return status zero. : is a no-op operator similar to true and false. In fact, command true and : both use the same function int colon_builtin() underneath. Parameter expansions Shell’s parameter expansions are used to check and modify parameters. Below illustrated how : is used in parameter expansion by setting a default value combined with :. Read more

August 31, 2022

Capture ASCII photo via mplayer

Mplayer Mplayer which stands for movie player for linux and supports most video and audio formats. Its manpage is really long. Check this page for a tips and tricks for mplayer and the FAQ from multimedia.cx is a compilations of questions and answers from the #mplayer IRC channel. Capture photo using mplayer into PNG file You can capturing video and then convert the frame into png or other formats. $ mplayer -vo png -frames 3 tv:// Let’s break it down: Read more

August 30, 2022

Bash builtin Read

The bash read command is a built-in utility that read text from the standard input. Bash Read Syntax The syntax for read command is: read <options> <arguements> The read command reads a line from the standard input and split it into fields, assigning each word to an arguement. If there are leftover words, they are assigned to the last arguement. $ read user_input this is my text $ echo $user_input this is my text $ read var1 var2 var3 there are 3 arguements $ echo $var1 there $ echo $var2 are $ echo $var3 3 arguements $REPLY $REPLY is the default variable used by the read builtin. Read more

August 24, 2022

Web License

TIL CERN developed its own open-source licence and the Web version 3.0 was the first and also last one release by CERN of Open Source software before W3C at MIT took over and then release WWW(HTTPD) version 3.1 under the MIT licence.

August 24, 2022

People Kernel Org

TIL about people.kernel.org which is a collection of individual blogs authored by Linux kernel developers. It is powered by WriteFreely and federated via ActivityPub. For now, the service is available to high-profile developers and maintainers of the Linux Kernel.

August 24, 2022

Journaling in vim

I came across this interesting post called journaling in vim by Danish Prakash which uses built-in functionality in Vim to make a painless digital journal workflow. The write-up is clear and I’ve been able to set up my workflow. Following is what I’ve learned during the process. Vim templates Vim templates allow you to specify a template to be used for new files with a certain extension. A template is a . Read more

August 10, 2022

Kernel Newbies

TIL about kernelnewbies. It is a community of aspiring Linux kernel developers who work to improve their Kernels and more experienced developers willing to share their knowledge. You can follow a tutorial for creating your first kernel patch, or read about Linux kernel Hacking. You can further learn about kernel subsystem as well.

August 8, 2022

Terraform Theory

Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage hundreds of cloud services. Terraform codifies cloud APIs into declarative configuration files. Terraform helps you manage all of your infrastructures as code and construct it as and when needed. Here are its key main features: A console that allows users to observe functions The ability to translate HCL code into JSON format A configuration language that supports interpolation A module count that keeps track of the number of modules applied to the infrastructure. Read more

August 2, 2022

Ego Is the Enemy

Pick up a book on a topic you know next to nothing about. Put yourself in rooms where you’re the least knowledgeable person. That uncomfortable feeling, that defensiveness that you feel when your most deeply held assumptions are challenged — what about subjecting yourself to it deliberately? Change your mind. Change your surroundings… An amateur is defensive. The professional finds learning (and even, occasionally, being shown up) to be enjoyable; they like being challenged and humbled, and engage in education as an ongoing and endless process. Read more

August 2, 2022


TIL about Nala, a front-end for libapt-pkg. It is written in Python and uses the python-apt api. Installation Nala is the testing and sid repos for Debian. So a simple apt is sufficed. Installation via Repository echo "deb https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null More details here Features Parrallel downloads - downloads 3 packages per unique mirror by defaults Fetch - get the fastest mirror History - print summary of transactions and manipulate history with nala history undo <ID> or nala history redo <ID>

August 1, 2022

Bash Shortcut: Ctrl and Alt keys

Commands for moving Ctrl + a: move to the beginning of line Ctrl + e: move to end of line Ctrl + f: Move forward a character Ctrl + b: Move back a character Alt + f: Move forward to the end of the next word Alt + b: Move back to the start of the current of previsous word Commands for Manipulating the History Ctrl + n: Fetch the next command form the history list (same as Down arrow) Ctrl + p: Fetch the previous command form the history list (same as Up arrow) Alt + <: Move to the first line in the history ALt + >: Move to the end of the input history ( the line currently bein entered) Ctrl + r: begins a backward search through command history Alt + p: Search backward through the history using a non-incremental search for a string supplied by the usser Alt + n: Search forward through the history using a non-incremental search for a string supplied by the usser Alt + . Read more

August 1, 2022

Emulators in browser

Virtual x86 Virtual x86 emulates an x86-compatible CPU and hardware. It is written mainly in Rust,Javascript and C - source code can be found here. The following OS are supported: Arch Linux Damn Small Linux Buildroot Linux ReactOS Windows 2000 Windows 98 Windows 95 Windows 1.01 MSDOS FreeDOS FreeBSD OpenBSD 9front Haiku Oberon KolibriOS QNX JSLinux JSLinux which enable you to run Linux or other operating system in your browser. The emulator is based upon on TinyEMU You can learn about the techinical implementation here. Read more

August 1, 2022

Vimgolf 5f1e0217becb80000692b9c4

Link: http://www.vimgolf.com/challenges/5f1e0217becb80000692b9c4 Rural post Simple challenge to remove all but the post code on each line Start file RD 5 Gore 9775 RD 6 Gore 9776 RD 7 Gore 9777 RD 1 Great Barrier Island 0991 RD 1 Greta Valley 7387 RD 1 Greytown 5794 RD 1 Hamilton 3281 RD 2 Hamilton 3282 End file 9775 9776 9777 0991 7387 5794 3281 3282 Solution: .,$norm $bd0j Explanation: .,$ - every line from current one till end of file norm - normal mode $ - go to end of line b - go to start of word d0 - delete till start of line j - move one line down RECAP Ranges: Here are the most interesting ranges you can use: * <number> - Any number <number> in your range refers to a line number. Read more

July 31, 2022

Vimgolf 5ba020f91abf2d000951055c

http://www.vimgolf.com/challenges/5ba020f91abf2d000951055c Com(m)a Trouble Someone was real stupid when placing his commas. Can you fix it? Start file ,0,1,2,3,4,5,6,7,89 ,1,2,3,4,5,6,7,8,90 ,2,3,4,5,6,7,8,9,01 ,3,4,5,6,7,8,9,0,12 ,4,5,6,7,8,9,0,1,23 56,7,8,9,0,1,2,3,4, 67,8,9,0,1,2,3,4,5, 78,9,0,1,2,3,4,5,6, 89,0,1,2,3,4,5,6,7, 90,1,2,3,4,5,6,7,8, End file 0,1,2,3,4,5,6,7,8,9 1,2,3,4,5,6,7,8,9,0 2,3,4,5,6,7,8,9,0,1 3,4,5,6,7,8,9,0,1,2 4,5,6,7,8,9,0,1,2,3 5,6,7,8,9,0,1,2,3,4 6,7,8,9,0,1,2,3,4,5 7,8,9,0,1,2,3,4,5,6 8,9,0,1,2,3,4,5,6,7 9,0,1,2,3,4,5,6,7,8 Solution: <C-V>Md6E.0p{EPZZ Explanation: <C-V> - visual mode M - Go to the first non-blank characterwise d - delete selected text 6E - Move to the end of the 6th line below . Read more

July 26, 2022


In the Beginning.. Was the Command Line. - Neal Stephenson. A dark screen with a blinking cursor. With a few keystrokes, you can hack the world. On the command line, you must know what you are doing. With a GUI, you can guess. You can guess a lot, actually, and just poke around all you want because most GUIs come with an undo feature. There is no “undo” on the command line. Read more

Powered by Hugo & Kiss.