Skip to content

Instantly share code, notes, and snippets.

View mrrooijen's full-sized avatar

Michael van Rooijen mrrooijen

View GitHub Profile
@mrrooijen
mrrooijen / install.sh
Created July 21, 2012 20:13
[Ubuntu 10.04 (Lucid)] Working GitlabHQ script for skipping the first 3 steps of the the installation guide at https://github.com/gitlabhq/gitlabhq/blob/stable/doc/installation.md
sudo apt-get update
sudo apt-get upgrade -y
apt-get install -y \
git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 \
libsqlite3-dev openssl libcurl4-openssl-dev libc6-dev libssl-dev libmysql++-dev \
make build-essential zlib1g zlib1g-dev libicu-dev redis-server openssh-server \
python-dev python-pip libyaml-dev libreadline6 libreadline6-dev autoconf \
ncurses-dev automake libtool bison subversion
@mrrooijen
mrrooijen / lang.sh
Created July 21, 2012 15:23
Before attempting to send an email, export LANG=en_US.UTF-8 to avoid stupid ASCII issues.
export LANG=en_US.UTF-8
@mrrooijen
mrrooijen / ulimitconfs.sh
Created July 20, 2012 01:42
ulimit hell.
# /etc/security/limits.conf
root - nofile 65000
deployer - nofile 65000
# Ubuntu upstart file at /etc/init/mongodb.conf
start on runlevel [2345]
stop on runlevel [016]
respawn
script
Vagrant::Config.run do |config|
config.vm.box = "lucid32"
config.vm.customize ["modifyvm", :id, "--memory", 2048]
config.vm.network :hostonly, "192.168.33.10"
config.vm.forward_port 8080, 5080
config.vm.forward_port 8443, 5443
end
@mrrooijen
mrrooijen / rbenvsudo.sh
Created April 3, 2012 10:29
A little shell function that allows you to perform rbenv (gem) commands with sudo privileges. Similar to rvmsudo.
function rbenvsudo(){
executable=$1
shift 1
sudo $(rbenv which $executable) $*
}
@mrrooijen
mrrooijen / deploy.rb
Created April 2, 2012 18:03
Deploy with Capistrano without SCM.
set :scm, :none
set :repository, "."
set :deploy_via, :copy
@mrrooijen
mrrooijen / systemd.service
Created March 28, 2012 13:55
Example Service File for systemd.
[Service]
ExecStart=/home/kill/.rvm/bin/ruby-1.9.2-p290 /home/kill/bin/echo-server.rb
User=kill
StandardOutput=syslog
StandardError=syslog
@mrrooijen
mrrooijen / .gitignore
Created February 1, 2012 18:04
MiddleMan on Heroku configuration.
.DS_Store
*.swp
*.swo
Gemfile.lock
@mrrooijen
mrrooijen / PostgreSQL-UTF8.sh
Created December 31, 2011 18:37
Make PostgreSQL use UTF-8 encoding instead of ASCII.
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
\c template1
VACUUM FREEZE;
UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1';
" Vim color scheme
"
" Name: railscat.vim
" Maintainer: Jeff Kreeftmeijer
" License: public domain
"
" A GUI only extended version of the Railscasts+ theme, that comes with
" Janus [1] and is, in turn, an extension to the original Railscasts theme
" [2], which is a port of the RailsCasts TextMate theme [3] to Vim.
"