Thursday, June 5, 2014

Find key maps in XMonad

Running the program xev and then looking at the output can tell you the key mapping for a key to put in xmonad.hs
http://ubuntuforums.org/archive/index.php/t-1755109.html

http://www.haskell.org/haskellwiki/Xmonad/Key_codes

Add user to vboxusers group to enable VM USB support

sudo usermod -a -G vboxusers $USER

Create a pdf from many images

convert *.jpg images.pdf

http://dancingpenguinsoflight.com/2010/02/converting-multiple-images-to-one-pdf-on-linux/

Adding latex support to a blog (like this one!)

To add LaTeX support to a Blogger.com blog, simply add this script under your Layout->HTML/JavaScript settings

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"> MathJax.Hub.Config({ extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$\$$','$\$$'], ["\(","\)"] ], displayMath: [ ['$\$$$\$$','$\$$$\$$'], ["$\backslash [$","$\backslash ]$"] ], }, "HTML-CSS": { availableFonts: ["TeX"] } });< /script>


I have forgotten where I got this tip, but whoever originally posted this - thank you!

Resize many gif images using imagemagick

for i in *.gif; do convert $\$$i -resize 400x400 $\$$(basename $\$$i .gif).gif; done

wget files of a certain type in all subdirectories

wget -r -A .gif <website>

Show status of dd command

Run dd with something like

sudo dd if=/dev/zero of=/dev/sdx

Now in another terminal, do ps ax| grep dd

Look at the process id (first column) of the dd command

Use that process id as input for

sudo kill -SIGUSR1 <pid>

This will force dd to print a status update

http://serverfault.com/questions/4906/using-dd-for-disk-cloning