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 / ubuntu+codeblocks.md
Last active August 29, 2015 14:18
openCV miscellaneous

linux這邊就沒有事先被compile好的版本,具體compile可以follow這個link

cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install
@ozooxo
ozooxo / gist:34339af4ea960e233d35
Last active August 29, 2015 14:19
Solve consistency between apt-get and dpkg tree

Cause

I face this problem because I accidentally try to install MongoDB 3.0.x (from http://repo.mongodb.org/apt/ubuntu) 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
ozooxo / gist:1de91f79228885f881c1
Last active August 29, 2015 14:20
Setup Github Page, Jekyll, and Jekyll Bootstrap

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
ozooxo / gist:f87c5cb4d3028cc1bdf7
Last active August 29, 2015 14:23
Setup Tomcat7 + Eclipse Luna (ubuntu 14.04)

Tomcat7

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
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: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
# 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
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
@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

Run default example:

$ ./gatling/bin/gatling.sh -sf gatling/user-files/simulations/computerdatabase/ -s computerdatabase.BasicSimulation -m

For a minimal setup using https://gatling.io/docs/current/extensions/maven_plugin/, then one can run it using mvn gatling:test.

For using io.gatling.highcharts:gatling-highcharts-maven-archetype, it seems have problem to run inside of Eclipse (I can't "add scala nature" even if I follow this toturial. However, to make it working in IntelliJ IDEA is quite straightforward (add scala plugin is kind of the only thing which need to handle).