Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
@wayneeseguin
wayneeseguin / gist:944295
Created April 27, 2011 14:03
Nginx 0.8.54/1.0.0 build error on a system.
# Configure
./configure --prefix=/usr/local/nginx/1.0.0 --conf-path=/usr/local/nginx/1.0.0/nginx/nginx.conf --sbin-path=/usr/local/nginx/1.0.0/bin/nginx --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-client-body-temp-path=/var/spool/nginx/client_body_temp --http-proxy-temp-path=/var/spool/nginx/proxy_temp --http-fastcgi-temp-path=/var/spool/nginx/fastcgi_temp --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --with-imap --with-imap_ssl_module --with-http_ssl_module --with-http_stub_status_module --with-pcre
@wayneeseguin
wayneeseguin / editor.sh
Created April 27, 2011 12:18 — forked from drnic/editor.sh
Dr. Nic's wild and wonderous dotfiles editor setup
#
# Function definitions
#
use_textmate ()
{
# Clean redcar from path the easy way.
export PATH="$(printf "$PATH" | sed -e "s#${projects_path}/ruby_apps/redcar/bin##g")"
export EDITOR="/usr/local/bin/mate -w"
export GEM_OPEN_EDITOR="/usr/local/bin/mate"
alias tm_dialog="$HOME/Library/Application\ Support/TextMate/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog"
@wayneeseguin
wayneeseguin / gist:898829
Created April 1, 2011 20:46
Common BDSM redis actions
root# bdsm redis start
#starting Redis as redis using /etc/redis/redis.conf...
16:37:09 wayneeseguin@Genius:~
$ bdsm redis status
redis-server:
status: running
version: 2.2.2
pid: 68059
port: 6379
@wayneeseguin
wayneeseguin / gist:898797
Created April 1, 2011 20:28
/etc/profile.d/rvm.sh
We couldn’t find that file to show.
function git_rev_head
{
# Can declare multiple variables on one line IFS separated.
# By default IFS is "white characters"
local rev_prompt_token=" » " rev=1 sym=0 sym_prompt="" rev_prompt="" \
colors=() branches=()
# If git branches contain whitespace, then the following should be quoted.
branches[$rev]="$(git name-rev --name-only head 2> /dev/null)"
branches[$sym]="$(git symbolic-ref -q head 2> /dev/null)"
@wayneeseguin
wayneeseguin / gist:892248
Created March 29, 2011 12:12
Fetch git branch with minimal external calls
branch=$(git symbolic-ref -q HEAD)
branch=${branch##refs/heads/}
true ${branch:=(no branch)}
# take 2
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$( git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' -e 's/(stage)/\\033[31m(stage)/' -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ "
# ALARM: production/master RED: stage YELLOW: next CYAN: everybody else
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' | sed -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' | sed -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' | sed -e 's/(stage)/\\033[31m(stage)/' | sed -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ "
@wayneeseguin
wayneeseguin / configure.log
Created March 14, 2011 13:30
1.9.3-p180 fails to compile on OSX 10.7
$ cat ~/.rvm/log/ruby-1.9.2-p180/configure.log
[2011-03-14 09:26:18] ./configure --prefix=/Users/wayne/.rvm/rubies/ruby-1.9.2-p180 --enable-shared --disable-install-doc
checking build system type... i386-apple-darwin11.0.0
checking host system type... i386-apple-darwin11.0.0
checking target system type... i386-apple-darwin11.0.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
@wayneeseguin
wayneeseguin / .zshrc
Created March 3, 2011 14:01 — forked from nclark/.zshrc
if [[ ( -a .rvmrc ) && $TERM == 'screen' ]]; then
source .rvmrc
fi