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
["23andMe", "4TucsonTeachers", "5gum", "AAACincy", "AARP", "AEA", "AETV", "AMCTheatres", "ANGAus", "AOL", "ATT", "ATTDeals", "AXE", "Accellion", "Accenture", "According2Casey", "ActivateN", "ActiveState", "ActoniaInc", "Acura_Insider", "AdExchangerJobs", "Adconion_Direct", "AdobeEdu", "AdrianPeterson", "AgentsofSHIELD", "AkkenCloud", "AmericanExpress", "AnDevCon", "AndreeHewitt", "AosthirMahmood", "Apperian", "Apptio", "AroundTownHVAC", "Art_Of_Climbing", "ArubaNetworks", "Audi", "AudrinaPatridge", "AuraSuites1", "BACARDI", "BMWi", "BPTeamUSA", "BancoMundial", "Banfield", "BarclaysFooty", "Bazaarvoice", "BehrPro", "BerkeleyData", "BestBuy", "BestBuy_Deals", "BetrayalABC", "BeyondTrust", "Bit9", "BiteSize_x", "Bitly", "BlackBerry", "Blackboard", "BlurbBooks", "BofA_Community", "BoxHQ", "Bravotv", "BrightHorizons", "BrittiAnn", "Broadcom", "BrotherOffice", "BuySellAds", "CAinc", "CBSSportsNet", "CDWCorp", "CNN", "CSIdentity", "CWAUnion", "CXthecloud", "CareerFuel", "Carestream", "Carhartt", "Carrabbas", "Caspio |
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
~$ python3 -m timeit -s 'add=lambda x,y:x+y' $'x=0\nfor i in range(1000000):x=add(x,1)\nassert x==1000000' | |
10 loops, best of 3: 189 msec per loop | |
~$ pypy3 -m timeit -s 'add=lambda x,y:x+y' $'x=0\nfor i in range(1000000):x=add(x,1)\nassert x==1000000' | |
100 loops, best of 3: 2.2 msec per loop | |
~$ python3 -m timeit -s 'from ctypes import c_long;add=lambda x,y:c_long(c_long(x).value+c_long(y).value).value' $'x=0\nfor i in range(1000000):x=add(x,1)\nassert x==1000000' | |
10 loops, best of 3: 1.07 sec per loop | |
~$ pypy3 -m timeit -s 'from ctypes import c_long;add=lambda x,y:c_long(c_long(x).value+c_long(y).value).value' $'x=0\nfor i in range(1000000):x=add(x,1)\nassert x==1000000' | |
10 loops, best of 3: 530 msec per loop | |
~$ python3 -m timeit -s 'from ctypes import c_long' $'x=c_long(0)\nfor i in range(1000000):x.value+=1\nassert x.value==1000000' | |
10 loops, best of 3: 217 msec per loop |
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
~$ TZ=Pacific/Apia date -d @1325239199 | |
Thu Dec 29 23:59:59 SDT 2011 | |
~$ TZ=Pacific/Apia date -d @1325239200 | |
Sat Dec 31 00:00:00 WSDT 2011 |
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
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::io::{stderr,Write,Read}; | |
use std::env::args; | |
macro_rules! unwrap_fmt { | |
($expr:expr) => (match $expr { | |
Ok(val) => val, | |
Err(err) => panic!("{}", err) | |
}) |
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
git init --bare dotfiles.git | |
cd dotfiles.git/ | |
git config: | |
core.worktree=/home/josh/ | |
status.showuntrackedfiles=no |
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
#!/usr/bin/env ruby | |
srand | |
command = ["/usr/bin/feh","--bg-scale"] | |
dir = ARGV[0] || "/home/michael/wall/default/" | |
choice = Dir[dir + "*.{jpg,png,jpeg}"].choice | |
system *([command] + [choice]) unless choice.empty? |
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
#!/usr/bin/env ruby | |
Dir["*.jpg"].each do |file| | |
mm,dd,yy,h,m = [0,3,6,9,11].map { |start| file[start,2] } | |
stamp = "20%s-%s-%s %s:%s" % [yy,mm,dd,h,m] | |
`exiv2 -k -Y 20#{yy} -O #{mm} -D #{dd} -a#{h}:#{m} ad "#{file}"` | |
exit $?.exitstatus if $?.exitstatus.nonzero? | |
`touch -d "#{stamp}" "#{file}"` | |
exit $?.exitstatus if $?.exitstatus.nonzero? | |
end |
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
# Put track numbers in a format that the Sansa Clip doesn't choke on. | |
from mutagen.easyid3 import EasyID3 | |
import sys,re | |
r = re.compile('\d/\d\d') | |
for f in sys.argv[1:]: | |
print f | |
g = EasyID3(f) |
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
from signal import * | |
from subprocess import * | |
Popen(['true']).communicate() | |
signal(SIGCHLD, SIG_IGN) | |
Popen(['true']).communicate() |
OlderNewer