View gist:307445
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://redis.googlecode.com/files/redis-1.2.2.tar.gz | |
tar -zxvf redis-1.2.2.tar.gz | |
cd redis-1.2.2 | |
make && ./redis-server |
View make-gcc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
GCC_VER=4.5.2 | |
wget -O /tmp/gcc-$GCC_VER.tar.bz2 ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.bz2 | |
tar jxvf /tmp/gcc-$GCC_VER.tar.bz2 | |
cd gcc-$GCC_VER | |
mkdir -p $HOME/opt/gcc/gcc-$GCC_VER | |
./configure --prefix=$HOME/opt/gcc/gcc-$GCC_VER --with-mpc | |
CPUCOUNT=`grep processor /proc/cpuinfo | wc -l` | |
make -j$CPUCOUNT |
View main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, const char** argv) { | |
int flags = FlagsFromArgs(argc, argv); | |
Memory* memory = MemoryNew( MEMORY_HEAP_256MB | MEMORY_HEAP_DEBUG | flags ); | |
Sound* sound = SoundNew( memory, SOUNDMGR_ALL_CHANELS | flags ); | |
Renderer* renderer = RendererNew( memory, RENDERER_TRIPLE_BUFFER | RENDERER_SM_20 | flags ); | |
Physics* phys = PhysicsNew( memory, sound, PHYSICS_AWESOME_FLAG | flags); | |
// .. etc .. | |
Game* game = GameNew( memory, sound, physics, ... , GAME_AAA_MODE | flags ); |
View setup_coreutils.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On OSX, some utilities (tar, sed, etc) are totally outdated. You can | |
# brew install coreutils to get around this, but the tools are named gsed, | |
# gtar, etc. | |
setup_coreutils () { | |
if [ "`uname -o`" == "Darwin" ]; then | |
PATH="/usr/local/bin:$PATH" && hash -r | |
if [ ! -e /usr/local/bin/gln ]; then | |
printf "On OSX you need GNU coreutils. Please install brew and coreutils.\n\n" | |
printf " ruby -e \"\$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)\" && sudo brew install coreutils\n\n\n" >&2 | |
exit 2 |
View vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype plugin indent on | |
" set t_Co=256 | |
set t_Co=8 | |
syntax on | |
set bs=indent,eol,start | |
set ts=4 sts=4 expandtab shiftround smarttab shiftwidth=4 | |
set hlsearch showmatch ignorecase incsearch smartcase | |
set noerrorbells | |
set showcmd title cmdheight=2 |
View mkdb.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 3 ]; then | |
echo >&2 "$0 <db> <user> <pass>" | |
exit 2 | |
fi | |
db="$1" | |
db_user="$2" | |
db_pass="$3" | |
mysql <<EOF | |
CREATE DATABASE \`$db\`; |
View vimrc.basic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Original: https://gist.github.com/ambakshi/9334557/raw/vimrc.basic | |
" By Amit Bakshi | |
" | |
set nocompatible | |
filetype plugin indent on | |
set modeline | |
set incsearch hlsearch ignorecase smartcase | |
set expandtab smarttab shiftwidth=4 shiftround softtabstop=4 tabstop=4 | |
set smartindent autoindent copyindent cindent |
View asgard-bootstrap.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# curl -fsSL http://bit.ly/YXV7L3 | bash -e | |
# | |
# | |
set -e | |
DIR=$HOME/bin | |
[ -d "$DIR" ] || mkdir -p "$DIR" |
View screenrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# screenrc | |
encoding UTF-8 | |
# Behaviour | |
termcapinfo xterm ti@:te@ | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # Tell screen how to set colors. AB = background, AF=foreground | |
#attrcolor b ".I" # Allow bold colors - NB: This fucks up dircolors in iTerm2 | |
defbce "on" # Erase background with current bg color | |
altscreen on | |
#term xterm-256color |
View ssh-agent.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SSH_ENV="$HOME/.ssh/environment.$HOSTNAME" | |
start () { | |
if [ -f "$SSH_ENV" ]; then | |
source "$SSH_ENV" | |
if kill -0 "$SSH_AGENT_PID" 2>/dev/null; then | |
echo "Run 'source $SSH_ENV'" >&2 | |
return |
OlderNewer