Skip to content

Instantly share code, notes, and snippets.

View felixhummel's full-sized avatar

Felix Hummel felixhummel

View GitHub Profile
@felixhummel
felixhummel / build-nginx.sh
Created October 31, 2011 19:41
Build Nginx 1.0.8 on Ubuntu 10.10 with reverse web socket capabilities
# http://www.letseehere.com/reverse-proxy-web-sockets
export VERSION=1.0.8
export PREFIX=/usr/local
export USERNAME=nginx
export GECOS='nginx web server'
filename=nginx-$VERSION.tar.gz
set -x # print commands
@felixhummel
felixhummel / bindings.sh
Created October 16, 2011 08:53
$HOME/.bash/bindings.sh
# how to create new shortcuts:
# run ``cat > /tmp/x``
# type your shortcut
# press enter (creates new line still in cat)
# press C-d to send EOF to cat
# run ``cat -v /tmp/x | sed 's;\^\[;\\e;'``
# paste output here
# ipython style history
bind '"\e[A":history-search-backward'
# load global bash completion
if [[ -f /etc/bash_completion ]]; then
. /etc/bash_completion
fi
# load everything under ~/.bash/
if [[ -d $HOME/.bash/ ]]; then
for f in $HOME/.bash/*; do
source $f
done
@felixhummel
felixhummel / getcert
Created April 11, 2011 22:49
Get a (self-signed) SSL certificate for Ubuntu 10.10
#!/bin/bash
HOSTNAME=$1
TMPFILE=`mktemp`
FNAME=$HOSTNAME.crt
expect_cmd() {
cmd=$1
package=$2
which $cmd &> /dev/null
@felixhummel
felixhummel / rake.sh
Created March 29, 2011 12:08 — forked from turadg/rake.sh
# bash completion for rake
#
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw
#
# For details and discussion
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/
#
# INSTALL
#