Skip to content

Instantly share code, notes, and snippets.

# add this to your ~/.bash_profile
# example: tweetie_filter "#somehashtag"
tweetie_filter()
{
defaults write com.atebits.tweetie-mac filterTerms -array-add "$1"
}
var mailtos = $$("a.mailto");
for (var i = 0; i < mailtos.length; i++)
{
var email = mailtos[i].getAttribute("email") + "@" + mailtos[i].getAttribute("at");
mailtos[i].href = "mailto:" + email;
mailtos[i].removeChild(mailtos[i].firstChild);
mailtos[i].appendText(email);
}
#!/bin/sh
# If you're running Tweetie
osascript -e 'tell application "Tweetie"' -e "quit" -e "end tell"
defaults write com.atebits.tweetie-mac filterTerms -array-add "#thebachelor"
osascript -e 'tell application "Tweetie"' -e "open" -e "end tell"
# If you're running Twitterrific
osascript -e 'tell application "Twitterrific"' -e "quit" -e "end tell"
defaults write com.iconfactory.Twitterrific tweetTextFilter -string "#thebachelor"
function random(seed)
{
if (!seed)
seed = new Date().getTime();
seed = (seed*9301+49297) % 233280;
return seed/(233280.0);
}
document.write("using random(1): " + random(1));
document.write("<br>");
<br />
<b>Fatal error</b>: Call to undefined function ImageColorMatch() in <b>/srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php</b> on line <b>1040</b><br />
@pgib
pgib / .htaccess
Created May 14, 2010 22:34
Redirect IE 6 users to the bad milk campaign
# Redirect IE 6 users to Microsoft's expired milk campaign
RewriteCond %{HTTP_USER_AGENT} MSIE\ 6
RewriteRule .* http://www.microsoft.com/australia/technet/ie8milk/
alias restart_nvidia="restart_thin ~/nvidia_gtc"
alias restart_renesas="restart_thin ~/renesas_devcon"
restart_thin()
{
origpath=`pwd`
path=$1
if [ -z "$path" ]; then
echo "Usage: restart_thin <app root path>"
# add this into your ~/.bash_profile
# git branch highlighting
function parse_git_branch
{
branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'`
if [ -n "$branch" ]; then
echo "${branch} "
fi
}
Xen Minimal OS!
start_info: 0xa01000(VA)
nr_pages: 0x26700
shared_inf: 0xdebfb000(MA)
pt_base: 0xa04000(VA)
nr_pt_frames: 0x9
mfn_list: 0x967000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
find / -type f -name copyright.htm -exec sed -i .bak -e 's/Copyright © 20../Copyright © 2011/g' {} \;