Skip to content

Instantly share code, notes, and snippets.

View v1nc3ntlaw's full-sized avatar

Vincent Lin (Sheng-Je Lin) v1nc3ntlaw

View GitHub Profile
@v1nc3ntlaw
v1nc3ntlaw / rbenv.sh
Created March 30, 2012 13:50
rbenv install ruby 1.9.3-p327 on Ubuntu 12.04 LTS for chef bootstrap
# rbenv setup
export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
@v1nc3ntlaw
v1nc3ntlaw / com.coverallcrew.firewall.plist
Created March 24, 2012 08:47 — forked from pgib/com.coverallcrew.firewall.plist
coverallcrew firewall start-up script for mac os to forward port 80 to local nginx on 8080
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.coverallcrew.firewall</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
@v1nc3ntlaw
v1nc3ntlaw / development.rb
Created October 29, 2011 14:40 — forked from unicornrainbow/development.rb
Use Pry as IRB replacement in rails 3 console
# Add this to the end of your development.rb and add
#
# gem 'pry'
#
# to your Gemfile and run bundle to install.
silence_warnings do
begin
require 'pry'
IRB = Pry
@v1nc3ntlaw
v1nc3ntlaw / debian_lenny_rvm_rails_server
Created September 22, 2011 17:35
debian_lenny_rvm_rails_server
apt-get -y install -y install build-essential git-core curl
sudo bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo -e '# load rvm for all users\nsource "/usr/local/rvm/scripts/rvm"' >> /etc/profile
apt-get -y install build-essential bison openssl libreadline5 libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libpq-dev libcurl4-openssl-dev
rvm install ree
rvm use ree
@v1nc3ntlaw
v1nc3ntlaw / god
Created May 9, 2011 07:08 — forked from divineforest/god
god ubuntu init.d script
#!/bin/sh
### BEGIN INIT INFO
# Provides: god
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: God
### END INIT INFO
@v1nc3ntlaw
v1nc3ntlaw / redis_init_script
Created April 18, 2011 11:39
redis_init_script
#!/bin/sh
REDIS_PORT=6379
REDIS_EXEC=/usr/local/bin/redis-server
REDIS_CLI=/usr/local/bin/redis-cli
REDIS_CONF=/etc/redis.conf
PIDFILE=/var/run/redis.pid
case "$1" in
@v1nc3ntlaw
v1nc3ntlaw / arch linux ror php postgresql
Created August 13, 2010 21:04
arch linux ror php postgresql
# reference
# http://wiki.archlinux.org/index.php/PostgreSQL
@v1nc3ntlaw
v1nc3ntlaw / arch linux nginx php fastcgi
Created August 13, 2010 15:23
arch linux nginx php fastcgi
# reference
# http://library.linode.com/web-servers/nginx/php-fastcgi/debian-5-lenny#install_spawn_fcgi
# http://wiki.archlinux.org/index.php/Nginx
@v1nc3ntlaw
v1nc3ntlaw / arch linux ror
Created August 13, 2010 05:42
arch linux nginx ror
# reference
# http://github.com/jnstq/rails-nginx-passenger-ubuntu
$ sudo pacman -S base-devel openssl readline zlib
$ mkdir pkgs && cd pkgs
$ wget http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz
$ tar zxf ruby-enterprise-1.8.7-2010.02.tar.gz
$ cd ruby-enterprise-1.8.7-2010.02
$ sudo ./installer
$ Enter
@v1nc3ntlaw
v1nc3ntlaw / mldonkey
Created August 13, 2010 05:15
mldonkey
# telnet mldonkey command-line
$ telnet localhost 4000
# view current downloads
$ vd
# show users currently uploading
$ uploaders
# check shared files for removal