Skip to content

Instantly share code, notes, and snippets.

@douglaswaugh
douglaswaugh / gist:5de94dc2ede8719d2499fd544ee5d840
Created February 18, 2018 15:15
Move files with file extension modified within the last day
find . -name "*.JPG" -mtime -1 -exec mv '{}' ~/repos/house/kitchen-floor \;
import urllib2
proxy = urllib2.ProxyHandler({'http': 'localhost:8888'})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
response = urllib2.urlopen('http://url.com/to/request')
response.read()
import httplib
conn = httplib.HTTPConnection('localhost', 8888)
conn.request('GET', 'http://url.com/to/request')
Fri Jun 17 13:12:27 UTC 2016
@douglaswaugh
douglaswaugh / jasmine-spec-runner.js
Created September 2, 2014 14:41
Jasmine spec runner (for jsfiddle, etc)
// Jasmine spec runner
(function () {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var trivialReporter = new jasmine.TrivialReporter();
jasmineEnv.addReporter(trivialReporter);
jasmineEnv.specFilter = function (spec) {