Skip to content

Instantly share code, notes, and snippets.

View lmorchard's full-sized avatar
😅
drinking from multiple firehoses

Les Orchard lmorchard

😅
drinking from multiple firehoses
View GitHub Profile
@lmorchard
lmorchard / keybase.md
Created April 2, 2014 17:13
keybase.md

Keybase proof

I hereby claim:

  • I am lmorchard on github.
  • I am lmorchard (https://keybase.io/lmorchard) on keybase.
  • I have a public key whose fingerprint is 1F75 8522 08D5 284D 9680 5EFF 3D7E E8C3 BE5E C6B3

To claim this, I am signing this object:

var list = [ 1, 2, 3, 4, 5 ];
var loop_cb = (function () {
// if the list is empty, we're finished.
if (0 === list.length) { finished_cb(); }
// get the next value from the list
var next_value = list.shift();
// start a DB transaction
db.transaction(function (tx) {
// execute a SQL query
tx.executeSql(
@lmorchard
lmorchard / gist:1386240
Created November 22, 2011 17:13
Hue and brightness control over an RGB LED with two potentiometers.
// Hue and brightness control over an RGB LED with two potentiometers.
//
// Components:
// - 1 x RGB LED
// - 2 x POTs
// - 3 x 330ohm resistors
//
// Wiring:
// - LED R->330o->D9; G->330o->D10; B->330o->D11; A->5V
// - POT 1 1->5V; 2->A0; 3->GND
Traceback (most recent call last):
File "/vagrant/vendor/src/django/django/core/servers/basehttp.py", line 280, in run
self.result = application(self.environ, self.start_response)
File "/vagrant/vendor/src/django/django/core/servers/basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/vagrant/vendor/src/django/django/core/handlers/wsgi.py", line 248, in __call__
response = self.get_response(request)
@lmorchard
lmorchard / gist:2667611
Created May 12, 2012 16:58
Some homework on the snarky Biblical marriage image I shared on facebook

http://img.gawkerassets.com/img/17m7ymo0bc12hjpg/original.jpg

Panel 1:

Bunk. Genesis 2:24 doesn't say any of those things. Especially not about arranged marriages or stoning. http://www.biblegateway.com/passage/?search=Genesis%202&version=NIV#en-NIV-55

Panel 2:

Genesis 38:6-10 sounds like it's about "Levirate" marriage, wherein a brother is obliged to take on his widow-in-law. That sounds relatively protective of women, in a context where women have few rights otherwise. I guess the widow could refuse, but it probably wouldn't end well for her. I don't think that much of Genesis 38 sounds like a good model for marriage in America.

@lmorchard
lmorchard / gist:2890175
Created June 7, 2012 17:23
Insano styles
<pre class="eval" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.286em; margin-left: 0px; padding-top: 15px; padding-right: 15px; padding-bottom: 15px; padding-left: 15px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; border-top-color: rgb(203, 200, 185); border-right-color: rgb(203, 200, 185); border-bottom-color: rgb(203, 200, 185); border-left-color: rgb(203, 200, 185); background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(246, 246, 242); overflow-x: auto; overflow-y: auto; font: normal normal normal 100%/normal 'Courier New', 'Andale Mono', monospace; background-position: initial initial; background-repeat: initial initial; ">make BUILD_OPT=1 -f Makefile.ref</pre>
@lmorchard
lmorchard / gist:3077811
Created July 9, 2012 17:39
attachment-migration-run
Start of migration for file with MindTouch ID 2754
End of migration for file with MindTouch ID 2754
Start of migration for file with MindTouch ID 3601
End of migration for file with MindTouch ID 3601
Start of migration for file with MindTouch ID 3600
End of migration for file with MindTouch ID 3600
Start of migration for file with MindTouch ID 3031
End of migration for file with MindTouch ID 3031
Start of migration for file with MindTouch ID 3207
End of migration for file with MindTouch ID 3207
@lmorchard
lmorchard / gist:3077816
Created July 9, 2012 17:40
attachment-migration-run-errors
grep -i 'File error' -A1 attach-result.txt
File error (Attachment 4777): cannot locate /vagrant/attachments/477/7.res/None.bin on filesystem, contents not in database
Missing file's MindTouch URL would be https://developer.mozilla.org/@api/deki/files/3613/hut.jpg
--
File error (Attachment 4886): cannot locate /vagrant/attachments/488/6.res/None.bin on filesystem, contents not in database
Missing file's MindTouch URL would be https://developer.mozilla.org/@api/deki/files/3683/slice.png
--
File error (Attachment 6656): cannot locate /vagrant/attachments/665/6.res/None.bin on filesystem, contents not in database
Missing file's MindTouch URL would be https://developer.mozilla.org/@api/deki/files/4946/progress-1.png
getFileContent: function(fileObjOrUrl) {
var url = fileObjOrUrl.url || fileObjOrUrl;
if(!url) return '';
var result = '',
p = kuma.url.parse(env.url, true),
base_url = p.protocol + '//' + p.host;
url = base_url + url;
@lmorchard
lmorchard / gist:3166533
Created July 23, 2012 22:03
Attachment test failures
(kuma-venv)[vagrant@kuma vagrant]$ (cd / && /vagrant/manage.py test wiki)
nosetests --verbosity 1 wiki
Creating test database 'default'...
...Skipping setup of test_kuma!
...Try FORCE_DB=true if you need fresh databases.
No fixtures found.
.................F..............................................................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.......SSS..SSSSS......S..........SSSSSSSSSSS..................SSSSSSSSSSSSS........S..SS..EE.F....................E....................S.....2012-07-23 15:02:22,155 ERROR [Errno 2] No such file or directory: '/home/vagrant/mdc_pages/popular.json'
2012-07-23 15:02:22,441 ERROR [Errno 2] No such file or directory: '/home/vagrant/mdc_pages/popular.json'
...........
======================================================================