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
set number | |
set filetype=true | |
set nowrap | |
set sw=2 | |
set ignorecase | |
set smartcase | |
set ts=2 | |
syntax enable | |
set hlsearch |
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 'FileUtils' | |
require 'net/http' | |
require 'uri' | |
class WebCache | |
def initialize | |
@download_cache_root = "./downloads" | |
end | |
def url_to_path(url) |
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
import datetime | |
import time | |
import urllib2 | |
def log(s, ts=None): | |
ts = datetime.datetime.now() | |
print ts.strftime("%H:%M:%S ") + s | |
def main(): | |
last_state_change = time.time() |
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
sleep `python -c "print 60*$1"` && osascript -e 'tell application "System Events" to sleep' |