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
xml2_sax_sample: xml2_sax_sample.c | |
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c | |
clean: | |
rm xml2_sax_sample |
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
(use '(incanter core processing)) | |
;; simple interactive Processing example taken from processingjs.org website: | |
;; http://processingjs.org/source/basic-example/processingjs_basic-example.html | |
;; set up variable references to use in the sketch object | |
(let [radius (ref 50.0) | |
X (ref nil) | |
Y (ref nil) |
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
README.html |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | 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/sh | |
# .git/hooks/post-checkout | |
# chmod +x .git/hooks/post-checkout | |
if [ $(git symbolic-ref HEAD | cut -d '/' -f 3) == 'master' ]; then | |
lines[0]="Master, Master, where's the dreams that I've been after?" | |
lines[1]="Master, Master, you promised only lies" | |
lines[2]="Laughter, laughter, all I hear or see is laughter" | |
lines[3]="Laughter, laughter, laughing at my cries" | |
echo " ${lines[$((RANDOM%${#lines[*]}))]}"; |
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 | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh |
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 git tab completion and PS1 integration | |
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then | |
. /usr/local/git/contrib/completion/git-completion.bash | |
fi | |
GIT_PS1_SHOWDIRTYSTATE=true | |
if [ -f /opt/local/etc/bash_completion ]; then | |
. /opt/local/etc/bash_completion | |
fi |
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
;; -*-mode:Emacs-Lisp;buffer-cleanup-p:t-*- | |
;; Time-stamp: <2010-09-15 08:54:34 dky> | |
;;----------------------------------------------------------------------------- | |
;; File : emacsserver.el | |
;; Auth : Dhruva Krishnamurthy ([email protected]) | |
;; Status : Development (flaky) | |
;; Usage : | |
;; o As server: | |
;; (require 'emacsserver) | |
;; (emacsserver-start "magic") |
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
# A git log alias. | |
# Shows the brief log describtion in one line. | |
# Adds colors, a relative date and the owner. | |
# File name: .gitconfig | |
[alias] | |
look = log --graph --pretty=format:'%Cred %h : %Creset%s %Cgreen(%cr) %C(blue)<%an>%C(yellow)%d %Creset' --date=relative |
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
#!/usr/bin/env bash | |
# place this in your path somewhere | |
# usage xcodeversionr.sh 1.0.1 MyProject-Info.plist | |
echo "Version: $1" | |
echo "File: $2" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $1 (build `git rev-parse --short HEAD`)" $2 |
OlderNewer