Skip to content

Instantly share code, notes, and snippets.

View othiym23's full-sized avatar
💭
what is this thing you call, "architecture"

Forrest L Norvell othiym23

💭
what is this thing you call, "architecture"
  • Ellation / Crunchyroll / VRV
  • San Francisco
View GitHub Profile
@othiym23
othiym23 / ski.scala
Created June 19, 2011 09:59
the SK[I] combinator calculus encoded in Scala
/**
* Good luck!
*
* This represents the tersest possible translation of the SK[I] combinator
* calculus into Scala's version of the typed lambda calculus. Previous
* attempts used the direct encoding of the calculus into fully parameterized
* FunctionX objects, but that was both incomprehensible and unreadable.
* This version is still sort of hard to follow, given all of the type
* annotations, but is considerably more concise.
*
@othiym23
othiym23 / Experiment.scala
Created June 26, 2011 06:44 — forked from hjast/Experiment.scala
Test.scala
package com.sportaneous.snippet
import java.util.Calendar
import java.text.SimpleDateFormat
import net.liftweb.http.js.JsCmds.ReplaceOptions._
import com.sportaneous.snippet.SelectValue._
import net.liftweb.http.js.{JE, JsCmd}
import net.liftweb.http.js.JsCmds.After._
import xml.{Null, PrefixedAttribute, NodeSeq}
import net.liftweb.http.{StatefulSnippet, SHtml, S}
@othiym23
othiym23 / archive-doublecheck.txt
Created July 19, 2011 00:34
dynamically linked libraries on OS X Snow Leopard
> find . -name "*.a" -print | xargs otool -L
Archive : ./node_modules/sqlite/build/default/deps/sqlite/libsqlite3-bundled.a
./node_modules/sqlite/build/default/deps/sqlite/libsqlite3-bundled.a(sqlite3_1.o):
Archive : ./node_modules/sqlite/deps/mpool-2.1.0/libmpool.a
./node_modules/sqlite/deps/mpool-2.1.0/libmpool.a(mpool.o):
@othiym23
othiym23 / mongod-ldd-output.txt
Created July 19, 2011 01:12
dynamically linked libraries on i686 (32-bit) Debian 6.0.2 squeeze
> ldd mongod
not a dynamic executable
@othiym23
othiym23 / mongod-ldd-output.txt
Created July 19, 2011 01:16
dynamically linked libraries on x86_64 (64-bit) Debian 6.0.1 squeeze
$ ldd mongod
not a dynamic executable
@othiym23
othiym23 / mktarball
Created July 19, 2011 20:35
Download, build, and hardlink a (hopefully) self-contained tarball to run a locker.
#!/usr/bin/env python
import sys
import os
import urllib
import glob
import subprocess
mongodb_urls = {'Linux': {'i686': 'http://fastdl.mongodb.org/linux/mongodb-linux-i686-static-1.8.2.tgz',
'x86_64': 'http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-static-legacy-1.8.2.tgz'},
@othiym23
othiym23 / simple-test.sh
Created August 17, 2011 23:40
Example of using TAP with tap-functions in /bin/bash
#!/bin/bash
. ./taps/tap-functions
plan_tests 7
PASSPHRASE="HamxSnadwich"
PASSPHRASE_HASH="2cfd41c20096d148"
is ${USER} 'ubuntu'
@othiym23
othiym23 / gist:1184990
Created August 31, 2011 23:00
vows output
Core can proxy handles Unicode A GET to /Me/testUnicode/test
✗ should respond with 200
» expected 200,
got 404 (==) // api-easy.js:233
✗ returned unicode JSON should be parsable
Error: Could not parse json correctly: Cannot GET /test
at Object.<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/tests/locker-core-api-test.js:174:31)
at [object Object].<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/api-easy/lib/api-easy.js:225:16)
at runTest (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/vows/lib/vows.js:93:26)
at EventEmitter.<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/vows/lib/vows.js:71:9)
@othiym23
othiym23 / gist:1185030
Created August 31, 2011 23:24
tests running forever
♢ Google Contacts Connector
Adding a listener for gcontacts/faked to contact/google
FAKEWEB: Unhandled GET request to https://www.google.com/m8/feeds/contacts/default/full?updated-min=1970-01-01T00%3A00%3A00Z&showdeleted=true&sortorder=ascending&orderby=lastmodified&max-results=3000&oauth_token=abc&alt=json
Synclet testSynclet starting for testSynclet-1
Synclet testSynclet finished for testSynclet-1
Synclet testSynclet starting for testSynclet-1
Synclet testSynclet finished for testSynclet-1
31 Aug 16:03:16 - debug: Firing an event for testSync/testSynclet from synclet/testSynclet-1 action(delete)
Synclet testSynclet starting for testSynclet-1
@othiym23
othiym23 / gist:1185077
Created August 31, 2011 23:55
errorrrz
Core can proxy handles Unicode A GET to /Me/testUnicode/test
✗ should respond with 200
» expected 200,
got 404 (==) // api-easy.js:233
✗ returned unicode JSON should be parsable
Error: Could not parse json correctly: Cannot GET /test
at Object.<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/tests/locker-core-api-test.js:174:31)
at [object Object].<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/api-easy/lib/api-easy.js:225:16)
at runTest (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/vows/lib/vows.js:93:26)
at EventEmitter.<anonymous> (/Users/ogd/Documents/projects/singly/locker-mainline-git/node_modules/vows/lib/vows.js:71:9)