Skip to content

Instantly share code, notes, and snippets.

View esjewett's full-sized avatar

Ethan Jewett esjewett

View GitHub Profile
@esjewett
esjewett / README.md
Last active August 29, 2015 14:24 — forked from mbostock/.block
val post_session = post("session", "token" -> token)
"API2" should {
"/session POST" in {
def withSession(a: => Any) = for(sess <- post_session) { a }
doAroundExpectations(withSession(_))
"Attempt to log in with a valid token should succeed with a 200 response" in {
(sess.xml \ "session" \ "user" \ "id").text must be equalTo (theUser.id.toString)
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('http://pinboard.in/add?url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard',%20'toolbar=no,width=700,height=350'));
@esjewett
esjewett / ABAP Insanity #1
Created March 2, 2011 14:26
See if you can guess the output?
FUNCTION ZTEST12345.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" EXPORTING
*" REFERENCE(E_TEST) TYPE I
*"----------------------------------------------------------------------
e_test = e_test + 1.
ENDFUNCTION.
@esjewett
esjewett / DynamicWizardExample.scala
Last active December 10, 2015 18:49
Seems to successfully dynamically create fields on second Screen of a Lift Wizard based on selection in the first Screen. Access fields of the second screen later on using "second.screenFields".
import net.liftweb._
import http._
import wizard._
import common.{Empty, Box}
import net.liftweb.util.FieldContainer
import model.Thing
object ThingsWizard extends Wizard {
val emptyThings: Seq[Thing] = Seq()
@esjewett
esjewett / README.md
Last active December 20, 2015 15:49 — forked from mbostock/.block
@esjewett
esjewett / README.md
Last active April 2, 2016 15:40
dc dataTable sorting example
@esjewett
esjewett / US_cities.csv
Last active July 19, 2016 21:45
Tab delimited US Cities from Geonames export
We can't make this file beautiful and searchable because it's too large.
City,Latitude,Longitude,State
Amchitka,51.56722,178.8775,AK
Sunik (historical),52.43333,173.6,AK
Attu,52.9375,173.2375,AK
Ugiatok (historical),52.41667,173.58333,AK
Siksatok (historical),52.43333,173.6,AK
Navy Town,52.84083,173.17556,AK
Ugtikun (historical),52.41667,173.58333,AK
Ugtumuk (historical),52.41667,173.58333,AK
Ukashik (historical),52.41667,173.58333,AK
@esjewett
esjewett / .block
Last active November 9, 2016 22:32
fresh block
license: mit
@esjewett
esjewett / .block
Last active November 9, 2016 22:37
d3-force collide fix
license: mit