notes

If you are using os rename src dest…

If you are using os.rename(src,dest) outside the current working directory, you can’t simply use os.rename(filename, “output.mp3”) since it will move the file to the current working directory. You should rather, path.dirname to get the file’s directory and then rename the file. For example you can use `os.rename(file_name, os.path.dirname(file_name) + ‘/{song_title}.mp3’.format(song_title=song_title))`

Fixing my zsh history

I recently corrupted my zsh history and was facing this error. After a reboot, I started seeing a message when loading the shell: zsh: corrupt history file /home/myusername/.zsh_history I fixed it using: mv .zsh_history .zsh_history_bad strings .zsh_history_bad > .zsh_history fc -R .zsh_history

Author Biography Alongside Pictures in Latex

Some journal publications require you to put author biography for each author with their pictures. For this I found the _picins _package. To install this package you can run the following commands sudo mkdir /usr/share/texmf/tex/latex/picins sudo wget -O /usr/share/texmf/tex/latex/picins/picins.sty http://ctan.imsc.res.in/macros/latex209/contrib/picins/picins.sty http://mirrors.ctan.org/macros/latex209/contrib/picins/picins.sty sudo /usr/bin/texconfig rehash So, then you can use the following latex code for biography of an author: …

Author Biography Alongside Pictures in Latex Read More »

A tip on using fsck

A tip on using fsck when you are stuck in emergency mode. Whenever you are using `fsck -y` and it does not allow you to run because a certain device (say /dev/sdaX) is mounted, it does not mean you can’t run `fsck -y /dev/sdaY`. That is you don’t unmount that device.

Scroll to Top