Skip to content

Instantly share code, notes, and snippets.

View erain's full-sized avatar

Yu YI erain

View GitHub Profile
@erain
erain / script.md
Last active October 6, 2015 01:07 — forked from torgeir/install_redis_on_ubuntu.md
Redis 2.4.8 Install on Ubuntu 10.04

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
$ tar xvfz redis-2.6.7.tar.gz 
$ cd redis-2.6.7/
$ sudo mkdir -p /opt/redis
$ sudo make PREFIX=/opt/redis install
$ sudo cp redis.conf /opt/redis/redis.conf
$ cd /opt/redis
@erain
erain / tree.md
Created April 24, 2012 02:15 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@erain
erain / NFPonUbuntu.sh
Created March 23, 2012 03:05
This is a Automatic Script for setting up nginx, fast-cgi (php-fpm) and php on Ubuntu system.
# install Nginx
sudo apt-get install nginx
# install php5.3 and some php modules
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5-cgi php5-fpm php5-mysql php5-curl php5-gd php-pear php5-imap php5-mcrypt php5-mhash php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json php5-common php-apc php5-dev
# set up Nginx