Noting small mistakes down is a pretty cool way of learning. Similar to that, I keep around a text file called ‘commands.md’ which is a gigantic list of tiny how-tos. Every time I struggle and invest way too much learning what command(s) to run to do something, I prepend to this list. Here’s an excerpt:
# js debugger breakpoint before page reload
addEventListener('beforeunload',()=>{debugger})
# Patch pip packages from source
git clone https://github.com/rkern/line_profiler.git
find line_profiler -name '*.pyx' -exec cython {} \;
# do some edits
cd line_profiler && pip install . --user
# bash script: cd to where the script is
cd "${0%/*}"
# imagemagick change image white to transparency
mogrify -transparent white image.png
with fuzzy matching:
mogrify -transparent white -fuzz 10% image.png
# install packages in octave
e.g. to install `symbolic`:
pkg -forge install symbolic
pkg load symbolic
# setting up swap on linux
Storing 1024 * 1M of swap in `/var/swap.1`
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
Enable:
sudo /sbin/swapon /var/swap.1
Add to `/etc/fstab` to start swap on boot:
/var/swap.1 swap swap defaults 0 0
Noting small mistakes down is a pretty cool way of learning. Similar to that, I keep around a text file called ‘commands.md’ which is a gigantic list of tiny how-tos. Every time I struggle and invest way too much learning what command(s) to run to do something, I prepend to this list. Here’s an excerpt: