Skip to content

Instantly share code, notes, and snippets.

View mikew's full-sized avatar

Mike Wyatt mikew

  • 709scene
  • Halifax, Nova Scotia
  • 06:27 (UTC -04:00)
View GitHub Profile
@mikew
mikew / keycode
Created October 2, 2009 01:00
Helper scripts to send applescript key codes from terminal input
#!/bin/sh
osascript - <<EOF
tell application "System Events"
key code $1
end tell
EOF
@mikew
mikew / .bash_profile
Created October 2, 2009 00:58
Helper script to open rails projects
# ...
workon () {
OLDIFS=$IFS
IFS=$'\n'
output=$(workon.rb $1)
for line in $output; do
echo $line
#!/bin/sh
calculate ()
{
local value=$(echo "$*" | bc -q)
echo $value
}
float_conditional ()
{
id title address created_on lat lng notes
1 Academy Canada 167-169 Kenmount Road 2005-12-25 07:27:07 47.555099 -52.766663 Unsecure connection from nearby house
2 Airport Airport Heights 2005-12-25 07:28:26 47.6202811 -52.751712 NULL
3 Chad's House 13 Liverpool Ave 2005-12-25 07:28:45 47.565027 -52.726991 NULL
4 Coffee &amp; Company 204 Water Street 2005-12-25 07:29:08 47.563719 -52.707639 NULL
5 Convergys Customer Management 274 Torbay Road 2005-12-25 07:29:37 47.599109 -52.711220 Unsecure (admin:admin) from a nearby house
6 Credit Union 341 Freshwater Road 2005-12-25 07:30:39 47.561087 -52.746051 NULL
7 Don Cherry&#39;s 290 Freshwater Road 2005-12-25 07:31:28 47.563165 -52.741338 NULL
8 Future Shop 20 Stavanger Dr 2005-12-25 07:31:45 47.615481 -52.718738 NULL
9 Hava Java 216 Water Street 2005-12-25 07:32:13 47.564143 -52.707250 NULL