Skip to content

Instantly share code, notes, and snippets.

View jameslaneconkling's full-sized avatar

James Conkling jameslaneconkling

View GitHub Profile
@roberthoenig
roberthoenig / ycombinator.jl
Created March 19, 2018 20:52
Julia implementation of a Y combinator, together with an exmplae implementation of factorials.
# Define a strict Y combinator function.
Y = (f) -> ((x)->(f((y)->((x(x))(y)))))(
(x)->(f((y)->((x(x))(y))))
)
# Use the Y combinator the implement a factorial function.
factorialbasefunc = (f) -> ((n)->(n==0 ? 1 : n*f(n-1)))
factorial = Y(factorialbasefunc)
println(factorial(5)) # 120
@tmcw
tmcw / ticks.js
Created September 26, 2016 18:59
import * as d3 from 'd3';
import React from 'react';
const top = 1;
const right = 2;
const bottom = 3;
const left = 4;
const epsilon = 1e-6;
function translateX(scale0, scale1, d) {

Abridged History of Tech & Related Reads

Way back in the day devseed did Drupal. We saw two main problems with it:

  • It tried to hit lots of different usecases and handled this by growing ever-larger instead of becoming modular
  • It was slow

We couldn't respond to #2 because it was the 'essential quality' of Drupal being built on PHP/MySQL and having 'make everything dynamic' as an essential property.

We responded to #1 with the 'smallcore idea': http://developmentseed.org/blog/2009/oct/28/smallcore-manifesto-help-us-build-better-teddy-bear/ This was semi-successful but was a hard sell because Drupal's module infrastructure was brittle and had the impossible goal of making programming-like tasks available as configuration.

@cjrd
cjrd / README.md
Last active October 15, 2024 19:02
Interactive tool for creating directed graphs using d3.js.

directed-graph-creator

Interactive tool for creating directed graphs, created using d3.js.

Demo: http://bl.ocks.org/cjrd/6863459

Operation:

  • drag/scroll to translate/zoom the graph
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"