Nerdism
Random geek stuff I save for later reference. Maybe it’ll be useful for others, too. Who knows.

Oct
30

Enter about:config into the URL bar and hit .
Search for:
keyword.URL
Double-click and paste:
http://yubnub.org/parser/parse?command=

Oct
27
Skinny tabs

Skinny tabs

Edit /Users//Library/Application Support/Firefox/Profiles/xxxxxxxx.default/chrome/userChrome.css and add:


/* For perfect skinny tab height */
.tabbrowser-tab {
height: 21px !important;
}

In location bar, type:

about:config

Search for:

browser.tabs.closeButtons

Change value to:

3

Sep
13

Script is here.
Usage: imageshacker.py /path/to/image.jpg

Originally from solarwind at http://bbs.archlinux.org/viewtopic.php?id=45910

Sep
13

This script is useful if you connect your laptop to an external monitor. It will move all windows from your laptop to your “main display”, then dim the laptop screen to 0 brightness.

Note: Change the following to match your main display:

set screen_width to 1440
set screen_height to 900

Here is the AppleScript.

Apr
26

A fellow, Graham, made a nice little python script to shorten urls with bit.ly here.

I modified it to add a growl notification, authentication support (via your bit.ly apikey), and added the option for an argument (for those that want to run it in the terminal and paste in a URL manually). Hope someone else finds it useful… it took me longer than it should have to figure out how to parse the JSON returned by the query with python and the simplejson module :P .

Thanks Graham.

UPDATE: I added the script to my Google Code page. Click here for the latest version of this script.

Apr
18

http://www.insanelymac.com/forum/index.php?showtopic=31294

Feb
16

Solution:
http://www.macosxhints.com/article.php?story=20070730145747991

Bash script to generate the applescripts:

#!/usr/bin/env bash
SAFARI_SCRIPTS_PATH="$HOME/Library/Scripts/Applications/Safari"
mkdir -p "$SAFARI_SCRIPTS_PATH"
# tabs 1-9
for (( i = 1; i < 10; i++ )); do
script_filename="$SAFARI_SCRIPTS_PATH/Activate Tab $i"
osascript<<-EOF
script setTab
tell front window of app "Safari" to set current tab to tab $i
end script
store script setTab in posix file "$script_filename" replacing yes
EOF
echo "Created $script_filename"
done
# last tab
script_filename="$SAFARI_SCRIPTS_PATH/Activate Last Tab"
osascript<<-EOF
script setTab
tell front window of app "Safari" to set current tab to last tab
end script
store script setTab in posix file "$script_filename" replacing yes
EOF
echo "Created $script_filename"
echo "Done"

Use Quicksilver triggers to call each of the Applescripts. Remember to limit the scope to Safari/Webkit only.

Nov
13

Edit ~/.login and put the following blurb in it:

# SSH Agent
set SSH_AGENT_PROC = `ps -eaf | awk '/usr\/bin\/ssh-agent/ {print $8}'`
# Check for existing ssh-agent process
if ( $SSH_AGENT_PROC != "/usr/bin/ssh-agent" ) then
echo "Unable to find existing ssh-agent. Starting ssh-agent..."
ssh-agent
endif

Oct
03
Sep
28

This script toggles Bluetooth and sends a growl notification.

Note: This script requires a command-line utility called blueutil found here.

Here is the script.