Category: Reference

Converting from Tikz to PNG

Here’s how I did it: \documentclass[preview,border=4mm,convert={density=600,outext=.png}]{standalone}   \usepackage{url} \usepackage{tikz} \usepackage{color} \begin{document}   \begin{tikzpicture} add figure source here \end{tikzpicture}   \end{document}\documentclass[preview,border=4mm,convert={density=600,outext=.png}]{standalone} \usepackage{url} \usepackage{tikz} \usepackage{color} \begin{document} \begin{tikzpicture} add figure source here \end{tikzpicture} \end{document} Then compile using: latexmk smr.tex -shell-escape Read More

Squashing git commits

to squash the last n commits (e.g 37) into one git reset –soft HEAD~37 && git commit –edit -m”$(git log –format=%B –reverse HEAD..HEAD@{1})” git push -f source:, thanks david Read More

OCaml Development in Vim

This is a quick run-through of how I set up my development environment in vim: Install pathogen.vim mkdir -p ~/.vim/autoload ~/.vim/bundle; \ curl -Sso ~/.vim/autoload/pathogen.vim \ -p ~/.vim/autoload ~/.vim/bundle; \ curl -Sso ~/.vim/autoload/pathogen.vim \ Add the following to ~/.vimrc: execute pathogen#infect() syntax on filetype plugin indent onexecute pathogen#infect() syntax on filetype plugin indent on Read More

What’s the difference between Debian Squeeze and wheezy ?

Squeeze is the code name Debian gives to the current stable release, wheezy is the name given to the current unstable release Read More

Where can I get Linux Distros quickly on the Cambridge Network ? Read More

How do I download many pdf’s a webpage at once ?

A combo of curl and regular expression, e.g. Ross Andersons “Security Engineering” is avalaible online under CC here but you must download each chapter as a seperate pdf, this is can the fixed using: $ curl|pref|acks|c[01-27]|biblio|index).pdf$ curl|pref|acks|c[01-27]|biblio|index).pdf Read More

How do I reset pathnames to commands ?

$ hash -r$ hash -r Read More

How do you use PWF as a proxy ?

$ plink -ssh -D 9090 <csid>$ plink -ssh -D 9090 <csid> Then connect to socks proxy on port 9090 and local host. Read More

Quick Guide: Remotely adding a new user on Ubuntu 12.04

In the following is a quick guide to creating a new user (we will be calling this user “username”) on a Amazon Cloud EC2 instance with Ubuntu 12.04 AMI CREATING NEW USER We will begin by adding the new user and setting the new users password $ sudo adduser This command will then take you Read More

How do I VPN into the University Network ?

UCS does a great job of explaining it here: Read More

1 2