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
foreach dir ( /opt/local/bin "$HOME/.gem/ruby/1.8/bin" "$HOME/bin" . ) | |
if ( $PATH !~ *$dir* && -d "$dir" ) setenv PATH "${dir}:${PATH}" | |
end |
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 | |
# Includes current git branch in tcsh prompt. | |
# | |
# EXAMPLE | |
# | |
# Your prompt can look like this: | |
# | |
# [myhost.com ~/repos/foo (master)] | |
# | |
# USAGE: |
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/awk -f | |
# execute like: | |
# % git status |& git-prompt.awk | |
# (Inspiration from http://niczsoft.com/2010/05/my-git-prompt/) | |
BEGIN { branch = ""; prefix=""; suffix="" } | |
/# On branch/ { branch = $4; } | |
/untracked files present/ { prefix = prefix "*"; } |
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
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
# Get stable versions from hg repo instead of downloading an increasing | |
# number of separate patches. | |
url 'https://vim.googlecode.com/hg/', :revision => '70eff6af1158' | |
version '7.3.462' | |
head 'https://vim.googlecode.com/hg/' |
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 | |
# Shell script scripts to read ip address | |
OS=`uname` | |
case $OS in | |
Linux) | |
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` | |
WANIP=`wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'` | |
;; | |
FreeBSD|OpenBSD|Darwin) |
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
require 'formula' | |
class Freetds < Formula | |
url 'http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/git/freetds-0.92.51.tar.gz' | |
homepage 'http://www.freetds.org/' | |
md5 '1d5f7292c9acf3209e1814e3e98664b2' | |
def install | |
system "./configure", | |
"--prefix=#{prefix}", |
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 | |
sudo launchctl stop com.parallels.vm.prl_naptd | |
sudo launchctl stop com.parallels.desktop.launchdaemon | |
sudo launchctl stop com.parallels.vm.prl_pcproxy | |
sudo killall llipd | |
sudo kextunload -b com.parallels.kext.prl_hypervisor | |
sudo kextunload -b com.parallels.kext.prl_hid_hook | |
sudo kextunload -b com.parallels.kext.prl_usb_connect |
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/tcsh | |
set ptail = "%"; | |
set color_path="%{\033[0;47m%}" | |
set color_gray="%{\033[1;36m%}" | |
set color_normal="%{\033[0m%}" | |
set color_history="%{\033[0;35m%}" | |
# history path | |
set p1="%B%h%b $color_path%~$color_normal%b " |
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
# awk -f sort.awk file-to-sort.yaml | |
BEGIN { | |
RS = "-\n"; | |
FS = "\n" | |
ORS = "\n-\n"; | |
OFS = "\n"; | |
} | |
{ | |
print $6, $2, $1, $4, $3, $5 |
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
// Modified to 'a a' instead of 'b a' due to vimium conflict | |
// ▲ ▲ ▼ ▼ ◀ ▶ ◀ ▶ a a | |
// example page: http://yckart.github.io/jquery.konami.js/ | |
// | |
var kkeys = [], konami = "38,38,40,40,37,39,37,39,65,65"; | |
$(document).keydown(function(e) { | |
kkeys.push( e.keyCode ); | |
if ( kkeys.toString().indexOf( konami ) >= 0 ){ | |
$(document).unbind('keydown',arguments.callee); | |
$.getScript('http://www.cornify.com/js/cornify.js',function(){ |
OlderNewer