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 / ubuntu_rvm_rails_development
Created September 22, 2011 17:33
ubuntu_rvm_rails_development
apt-get -y install vim byobu terminator htop tree
apt-get -y install git-core curl mysql-server libmysqlclient-dev libcurl4-openssl-dev
---
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
---
apt-get -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
@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 / 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 / rbenv-install-system-wide.sh
Last active July 26, 2022 01:08
rbenv install ruby 1.9.3-p448 on Debian 6 Squeeze
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline5 libreadline5-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
@v1nc3ntlaw
v1nc3ntlaw / rbenv-install-system-wide.sh
Last active December 23, 2020 13:57
rbenv install ruby 1.9.3-p448 on Ubuntu 12.04 LTS
#
# Run as root
# $ bash <(curl -s https://raw.github.com/gist/1631411)
#
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl \
libssl-dev \
@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 / 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 / git-post-receive-hook-irc-notification.sh
Created August 20, 2012 06:32
use git post receive hook send irc notification
#!/bin/sh
#
# An example hook script for the "post-receive" event.
#
# The "post-receive" script is run after receive-pack has accepted a pack
# and the repository has been updated. It is passed arguments in through
# stdin in the form
# <oldrev> <newrev> <refname>
# For example:
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
@v1nc3ntlaw
v1nc3ntlaw / mysql-utf8mb4-barracuda
Last active August 22, 2020 00:09
MySQL using utf8mb4 and innodb_file_format Barracuda settings
[mysqld]
init_connect='SET collation_connection = utf8mb4_unicode_ci'
init_connect='SET NAMES utf8mb4'
character-set-server = utf8mb4
character-set-client = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
innodb_file_format = Barracuda
Passenger Standalone with Nginx
-----
command
passenger start -S /tmp/s.dev.socket -d
nginx config example
upstream s_dev_server {