Skip to content

Instantly share code, notes, and snippets.

Cong-Xin Cynthia Qiu ozooxo

Block or report user

Report or block ozooxo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ozooxo /
Created Aug 11, 2015
Setup PostgreSQL

Basically follow this link will work.

To give access of remote users using postgresql-client, one need to add the following line in /etc/postgresql/9.3/main/pg_hba.conf.

host    all             all                  md5
ozooxo / gist:f87c5cb4d3028cc1bdf7
Last active Aug 29, 2015
Setup Tomcat7 + Eclipse Luna (ubuntu 14.04)
View gist:f87c5cb4d3028cc1bdf7


Setup tomcat7 is easy. Just do

sudo apt-get install tomcat7

and http://localhost:8080/ will work already. The default source files are in /usr/share/tomcat7, while the default path is in /var/lib/tomcat7/webapps/ROOT.

ozooxo / gist:1de91f79228885f881c1
Last active Aug 29, 2015
Setup Github Page, Jekyll, and Jekyll Bootstrap
View gist:1de91f79228885f881c1

My original plan is to setup a good viewing environment for markdown files (analyzing results produced by some template engine). No blog functions are needed. However, it turns out to be tedious and not as useful as expected.

To setup Ruby, basically following this link is fine. Note that rails (or at least node.js) is needed. Pure ruby is not enough.

To setup Jekyll, following this link. After installation, running

$ bundle exec jekyll serve
ozooxo / gist:34339af4ea960e233d35
Last active Aug 29, 2015
Solve consistency between apt-get and dpkg tree
View gist:34339af4ea960e233d35


I face this problem because I accidentally try to install MongoDB 3.0.x (from while actually a MongoDB 2.6.8 (provided by ubuntu) is already installed in the same computer. Therefore, both mongod and mongo commands are still point to the old version (which doesn't work actually). Since the official installation document said that "You cannot install this package concurrently with the mongodb, mongodb-server, or mongodb-clients packages provided by Ubuntu", this just cannot work.

A better way is to first completely uninstalled the older version before install the new one, but I already missed that time. So

sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen

cannot remove it completely (not sure whether that's the exact case), and \usr\bin\mongo and ``\usr\bin\mongo

ozooxo /
Last active Aug 29, 2015
openCV miscellaneous


cd ~/opencv
mkdir release
cd release
sudo make install
ozooxo / screenshot.png
Last active Aug 29, 2015
Change Eclipse Java version
View screenshot.png
beta@landlubber:/usr/lib/java$ update-alternatives --get-selections | grep java # java jvm location can be found using this command
appletviewer manual /usr/lib/jvm/java-7-oracle/bin/appletviewer
ControlPanel manual /usr/lib/jvm/java-7-oracle/jre/bin/ControlPanel
extcheck manual /usr/lib/jvm/java-7-oracle/bin/extcheck
idlj manual /usr/lib/jvm/java-7-oracle/bin/idlj
itweb-settings auto /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings
jar manual /usr/lib/jvm/java-7-oracle/bin/jar
jarsigner manual /usr/lib/jvm/java-7-oracle/bin/jarsigner
java manual /usr/lib/jvm/java-7-oracle/jre/bin/java
javac manual /usr/lib/jvm/java-7-oracle/bin/javac
ozooxo /
Last active Aug 29, 2015
Install MongoDB etc for "MongoDB University M101J" course in Ubuntu 14.04
beta@landlubber:~$ uname -a
Linux landlubber 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
beta@landlubber:~$ java -version
java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
beta@landlubber:~$ sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10
[sudo] password for beta:
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.OFXWl1OKUd --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/minecraft-installer-peeps-minecraft-installer.gpg --keyring /etc/apt/trusted.gpg.d/webupd8team-java.gpg --keyserver hkp:// --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server
ozooxo / gist:0479325e58c3652a19f5
Created Mar 20, 2015
Install Mamba in Ubuntu 14.04
View gist:0479325e58c3652a19f5
$ python --version # check python version, >= 2.6 needed
Python 2.7.6
$ sudo apt-get install python-pip
$ pip search Pillow
Pillow - Python Imaging Library (Fork)
LATEST: 2.7.0
pilbox - Pilbox is an image processing application server
built on the Tornado web framework using the
Pillow Imaging Library
ozooxo / gist:7ea98a96f44bd46e4234
Created Feb 13, 2015
Ubuntu .desktop files position
View gist:7ea98a96f44bd46e4234
View gist:edc9f92d1a737b2aa507
# There seems a Erlang build in in this package. To actually run Erlang environment,
# you need to ``sudo apt-get install erlang`` and ``erl`` but that's a too old version.
beta@landslide:~$ curl | sudo bash
beta@landslide:~$ sudo apt-get install riak=2.0.0-1
beta@landslide:~$ sudo -s
root@landslide:~# ulimit -n 65536
root@landslide:~# riak start
root@landslide:~# riak stop
You can’t perform that action at this time.