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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > | |
<head> | |
<title>Bart</title> | |
<style type="text/css" media="screen"> | |
div {max-width:300px;} | |
div.destination {font-size:24px;font-weight:bold;border:2px solid #00c;text-align:center;margin:0px -2px;} | |
div.estimates {padding-bottom:15px;} |
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 'rubygems' | |
require 'open-uri' | |
require 'json' | |
url = 'http://twitter.com/statuses/user_timeline.json?id=hc5duke&count=3200' | |
dates = open(url) { |f| JSON.parse f.read }.map { |e| Time.parse e['created_at'] } | |
sum = dates.inject(Hash.new(0)) { |s, t| s[t.strftime('%Y-%m-%d')] += 1; s } | |
total = 0 | |
sum.keys.sort.each { |k| puts "#{k}\t#{sum[k]}\t#{total += sum[k]}" } |
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
// hide status bar | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
[application setStatusBarHidden:TRUE]; | |
[window addSubview:controller.view]; | |
[window makeKeyAndVisible]; | |
} |
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
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
NSLog(@"touch!"); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > | |
<head> | |
<title>Bart</title> | |
<style type="text/css" media="screen"> | |
div {max-width:300px;} | |
div.destination {font-size:24px;font-weight:bold;border:2px solid #00c;text-align:center;margin:0px -2px;} | |
div.estimates {padding-bottom:15px;} |
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/bash | |
# based heavily on termwide prompt by Giles - created 2 November 98 | |
# http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO-12.html | |
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/Users/hchoi/dev/android-sdk-mac_x86-1.1_r1/tools:$PATH | |
export DISPLAY=:0.0 | |
export EDITOR=vi | |
function prompt_command { | |
local fillsize |
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 'rubygems' | |
require 'open-uri' | |
require 'json' | |
swivelers = ['badave', 'burnto', 'bmulloy', 'bwalsh', 'gerad', 'hc5duke', 'huned', 'kalendae', 'nataliegrae', 'quanghiem', 'teamswivel', 'visnup'].sort | |
debug = true | |
mode = 'total' # or 'daily' or 'weekly' | |
daily = {} | |
# grab files first |
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
tell application "GrowlHelperApp" | |
set the allNotificationsList to {"Debug"} | |
set the enabledNotificationsList to {"Debug"} | |
register as application ¬ | |
"AppleScript Growl" all notifications allNotificationsList ¬ | |
default notifications enabledNotificationsList ¬ | |
icon of application "Script Editor" | |
end tell |
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
$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 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
# Star Trek | |
(doc/"table.wikitable"/"tr").select{|tr| (tr/"td").count > 2}.map{|tr| (tr/"td").select{|td| !td.nil? && td.inner_html.match(/\"/)}.first.inner_html.gsub(/<\/?[^>]*>/, "").gsub(/\"/, "").gsub(" "," ") }[7..-1] |
OlderNewer