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 / jdk.md
Last active May 8, 2018 15:58
Multiple JDK on MacOS

Search Java version and install:

$ brew tap caskroom/versions

$ brew cask search java
==> Exact Match
java ✔
==> Partial Matches
charles-applejava eclipse-javascript java6 netbeans-java-ee yourkit-java-profiler
The Linux users' guide to Mac OS X
https://www.techradar.com/news/computing/apple/the-linux-users-guide-to-mac-os-x-624449#article-body
How to Install and Dual Boot Linux and Mac OS
https://www.lifewire.com/dual-boot-linux-and-mac-os-4125733
# git constants
testcasename=long-commit-path
unmergebranch=unmergebranch
mergebranch=mergebranch
# Clean up
rm -rf $HOME/Workspace/enterovirus-test/$testcasename/
cd $HOME/Workspace/enterovirus-test/
mkdir $testcasename
cd $testcasename
@ozooxo
ozooxo / gist:9959489
Last active September 29, 2017 17:08
clean up ubuntu disk space
sudo apt-get clean # cleaning up of the apt cache. it gives me roughly 500MB cache
sudo apt-get purge linux-image-3.5.0-37-generic # roughly 100MB per removed kernal. kernal list is in /boot/.
@ozooxo
ozooxo / gist:10600945
Last active November 7, 2016 21:06
Set up honeyd (ubuntu 12.04)
# installation
sudo apt-get install honeyd
sudo apt-get install nmap #(supported software for port scanning)
# check my eth0 address
ifconfig
### eth0 Link encap:Ethernet HWaddr 00:26:2d:f9:db:be <-----------------use this one
### inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
### inet6 addr: fe80::226:2dff:fef9:dbbe/64 Scope:Link
@ozooxo
ozooxo / gist:c69f8db42877df8997b1e25fcb654cb7
Created October 18, 2016 08:28
Install Trac on Ubuntu 14.04
apt-get install python python-babel
sudo apt install -y trac libapache2-mod-wsgi
apt-get install python-pip
pip install --upgrade Babel
pip install --upgrade Trac
mkdir -p /var/local/trac
trac-admin /var/local/trac initenv
htpasswd -c /var/local/trac/.htpasswd adminusername
@ozooxo
ozooxo / note.md
Created August 11, 2015 09:22
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             0.0.0.0/0               md5
@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'