Skip to content

Instantly share code, notes, and snippets.

View moredip's full-sized avatar

Pete Hodgson moredip

View GitHub Profile
function createDuck( name ){
var duck = {
fullName: function(){ name + " duck"; }
};
return duck;
};
/**
* Code Syntax Highlighter for Objective-C.
* Version 0.0.2
* Copyright (C) 2006 Shin, YoungJin.
* http://www.jiniya.net/lecture/techbox/test.html
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
@moredip
moredip / README.md
Last active August 29, 2015 14:24 — forked from mbostock/.block

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

@moredip
moredip / gulpfile.js
Last active August 29, 2015 14:12
gulp, browserify, reactify, and sadness
//based on https://medium.com/@sogko/gulp-browserify-the-gulp-y-way-bb359b3f9623
var gulp = require('gulp');
var browserify = require('browserify');
var transform = require('vinyl-transform');
var reactify = require('reactify');
gulp.task('browserify', function () {
var browserified = transform(function(filename) {
var b = browserify(filename);
return b.bundle();
@moredip
moredip / env.rb
Created April 3, 2014 23:32
How to point capybara to custom phantom or chromedriver executable
if RUBY_PLATFORM =~ /darwin/
require 'selenium/webdriver'
Selenium::WebDriver::PhantomJS.path = File.expand_path( "../../../tools/phantomjs-osx", __FILE__ )
Selenium::WebDriver::Chrome::Service.executable_path = File.expand_path( "../../../tools/chromedriver-osx", __FILE__ )
end