notes/notes.md

5.2 KiB
Raw Permalink Blame History

title
Notes

Git

Rebase

The use of -Xtheirs and -Xours appear to be somewhat counterintuitive, so think of it as telling git which branch code to favor when resolving rebase conflicts. For example, when doing:

git rebase -Xtheirs branch-b

Xtheirs favors your current branch-a code when overwriting merge conflicts, and vice versa -Xours overwrites merge conflicts with the code in branch-b.

Similar options exist in git merge command as well, but the meaning of -Xtheirs and -Xours is reversed due to the differences on how git rebase and git merge operate and what they consider ours vs. theirs:

git rebase -Xtheirs branch-b # <- ours: branch-b, theirs: branch-a
git merge -Xtheirs branch-b  # <- ours: branch-a, theirs: branch-b

Thus, if you are merging changes from origin/master and would like git to favor your current branch code during merge conflicts, youd need to do this:

git merge -Xours origin/master

Shell tips

Recursively remove execute permissions

chmod -R a-x+X,u-x+rwX,go-wx+rX Study/

SED debugger - sedsed

System related

Htop explained

Using perf

  • perf top -t <pid> shows the performance counters

rsync

rsync -a username@remote_host:/home/username/dir1 place_to_sync_on_local_machine

Like cp and similar tools, the source is always the first argument and the destination is always the second.

Nginx hosting setup

The below is used to generate the certificates. To add more sub-domains, just call the command again, adding the sub domain.

certbot certonly --agree-tos --email sanchayan@sanchayanmaity.net --webroot -w /var/lib/letsencrypt/ -d sanchayanmaity.net -d www.sanchayanmaity.net -d git.sanchayanmaity.net -d monitor.sanchayanmaity.net
certbot certonly --agree-tos --email sanchayan@sanchayanmaity.com --webroot -w /var/lib/letsencrypt/ -d sanchayanmaity.com -d www.sanchayanmaity.com -d git.sanchayanmaity.com -d monitor.sanchayanmaity.com

Setting up a kernel debugging environment

Javascript

C

Caching integer overflows in C

Where to find good bread in Bangalore

Wayland

A better way to read Wayland documentation

Distributed systems

PI calculus

Yocto

Yocto/openembedded builds never work on Arch and even on something old like Ubuntu 16.04, one runs into problems like this

docker is a blessing for such things.

docker run --rm -it -v {$PWD}:/oe-core crops/poky:debian-9 --workdir=/oe-core

Pulseaudio

Keyboard websites for split ergonomic keyboards

  • ergomech.store

  • keebmaker.com

  • boardsource.xyz

  • littlekeyboards.com

  • splitkb.com

  • rectangles.store

  • bastardkb.com

  • keeb.io

  • https://lowprokb.ca/

  • stackskb.com

Fish

GPG