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
# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
crop_pwd() { | |
((MAXMID=$COLUMNS / 2)) # truncate to this value | |
mypath="%~" | |
echo -n "%$MAXMID<...<$mypath" | |
} |
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
diff --git a/Classes/IRC/IRCUser.m b/Classes/IRC/IRCUser.m | |
index 6ee00c8..59c2f45 100755 | |
--- a/Classes/IRC/IRCUser.m | |
+++ b/Classes/IRC/IRCUser.m | |
@@ -4,6 +4,69 @@ | |
#define COLOR_NUMBER_MAX 30 | |
+#define hashsize(n) ( 1U << (n) ) | |
+#define hashmask(n) ( hashsize ( n ) - 1 ) |
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 | |
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
# Uses curl to be compatible with machines that don't have wget by default | |
LINODE_API_KEY=licensekey | |
DOMAIN_ID=domainid | |
RESOURCE_ID=resourceid | |
WAN_IP=`curl -s http://example.com/whatsmyip.php` | |
if [ -f $HOME/.wan_ip.txt ]; then |
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/ruby | |
require 'find' | |
require 'fileutils' | |
require 'getoptlong' | |
if ARGV.length < 2 | |
puts "Usage: ruby re-sign-frameworks.rb bundle signer" | |
exit | |
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
sshput () { | |
RSAKEY="${HOME}/.ssh/id_rsa.pub" | |
DSAKEY="${HOME}/.ssh/id_dsa.pub" | |
if [ $# -eq 2 ]; then | |
KEY=$1 | |
if [ ! -r $KEY ] | |
then | |
echo "'$KEY' does not exist or is not readable" | |
return 1 |
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
var sys = require('sys'), | |
fs = require('fs'), | |
spawn = require('child_process').spawn, | |
tail = spawn('tail', ['-f', 'server.log']); | |
// var used for \n scanner | |
tail.current_line = ""; | |
// holds user state | |
var status = { |
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/ruby | |
begin | |
require 'rubygems' | |
rescue LoadError | |
error_string = "\n\nYou must install rubygems in order to use this script" | |
raise error_string | |
end | |
begin |
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
export LC_ALL="en_US.UTF-8" # Use British English... | |
export LC_ALL="en_US.UTF-8" # Use British English... | |
export LANG="en_US.UTF-8" # ...as default language. | |
export TZ="America/New_York" # Force our time zone this location. | |
# this happened to work on iMac just because I had X11 installed | |
if [[ "x$DISPLAY" == "x" ]]; then | |
export EDITOR="vim" | |
else | |
export EDITOR="mate -w" |
NewerOlder