Skip to content

Instantly share code, notes, and snippets.

View ozooxo's full-sized avatar

Cong-Xin Cynthia Qiu ozooxo

View GitHub Profile
@ozooxo
ozooxo / gist:8969388
Created February 13, 2014 03:44
merge two pdf files
pdftk HW1_word.pdf HW1_photo.pdf cat output HW1.pdf
@ozooxo
ozooxo / gist:8962140
Created February 12, 2014 18:57
Run matlab in Ubuntu terminal: (Top one) quicker, but some plot-related functions seem not fully supported. (Bottom one) fully supported, but slower.
matlab -nojvm
matlab -nodesktop
@ozooxo
ozooxo / gist:8118784
Created December 24, 2013 23:30
Ubuntu 12.04 in my laptop cannot my own "magnetar" game. The reason is that the default java version is too old. It works after I manually changed it from openjdk-6 to openjdk-7.
sudo update-alternatives --config javac
sudo update-alternatives --config java
@ozooxo
ozooxo / gist:8009646
Created December 17, 2013 18:01
Repair ubuntu 12.04 X Window booting system

After trying to repair the touch-pad of my Ubuntu 12.04, the system cannot boot from X Window. It turns out that xserver-xorg is accidentally removed by sudo apt-get autoremove process after I installed xserver-xorg-input-synaptics. To repair it, just go to the recovery mode and

sudo apt-get install xserver-xorg
sudo dpkg-reconfigure xserver-xorg
@ozooxo
ozooxo / gist:7811145
Last active December 30, 2015 09:39
Tools like highlight.js can help detecting the name of a programming language from a piece of code. The set up in ubuntu is as follows. You can further decrease the number of programming languages by commenting the potential languages in line 641--707 of highlight.js file. It can increase the speed a little bit, but it's still to slow for a huge…
beta@landmark:~/Downloads$ sudo apt-get install nodejs
beta@landmark:~/Downloads$ sudo apt-get install npm
beta@landmark:~/Downloads$ npm install highlight.js
beta@landmark:~/Downloads$ node
> var hljs = require('highlight.js');
undefined
> hljs.highlightAuto("<p>abc</p>").language;
'xml'
@ozooxo
ozooxo / gist:7568836
Created November 20, 2013 18:54
The ``smlnj`` package cannot be located by simply doing ``sudo apt-get install smlnj`` in ubuntu 12.04. It can be installed by running the following code.
beta@landmark:~$ sudo add-apt-repository ppa:hrzhu/smlnj-backport
beta@landmark:~$ sudo apt-get update
beta@landmark:~$ sudo apt-get install smlnj
beta@landmark:~$ sml
Standard ML of New Jersey v110.75 [built: Tue Aug 20 07:15:06 2013]
-