Skip to content

Instantly share code, notes, and snippets.

Patrick Mulder mulderp

Block or report user

Report or block mulderp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jquery.oauth.js
/*
MIT License (MIT)
Copyright (c) 2011 Andy Edinborough
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH TH
View D3.js-Force-Layout-with-Labels-.markdown

D3.js Force Layout with Labels

Force driven layout in the awesome D3 JavaScript library. The mouse hides as you click and drag on the elements. Using the equally awesome solarized palette. I'm using this in one of my lynda.com classes.

A Pen by Patrick Mulder on CodePen.

License.

View gist:8825657
t = Tracer.new
t.add_filter { |t, b, *c| b.match(/app/) }
t.on {
...
}
@mulderp
mulderp / gist:9051804
Created Feb 17, 2014
A resizing command
View gist:9051804
convert large_image.png -resize "100x200" small_image.png
@mulderp
mulderp / gist:9186648
Created Feb 24, 2014
basic HTML template
View gist:9186648
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PAGE TITLE</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/normalize.css" rel="stylesheet" media="all">
<link href="css/styles.css" rel="stylesheet" media="all">
@mulderp
mulderp / gist:9249336
Created Feb 27, 2014
put all images in a html img tags
View gist:9249336
f = File.new("index.html","w") ; Dir["*.jpg"].each do |n| ; f.write(%Q(<h3>#{n}</h3>\n <img src="#{n}" />\n <hr>)) ; end; f.close
@mulderp
mulderp / gist:9740253
Created Mar 24, 2014
serverbone test
View gist:9740253
global.serverbone = require("serverbone");
global.BaseModel = serverbone.models.BaseModel;
global.redis = require("redis");
global.RedisDb = require('backbone-db-redis');
global.store = new RedisDb('mymodel', redis.createClient());
global.movieSchema = {
id: 'schemas/movies',
type: 'object',
@mulderp
mulderp / gist:11349911
Created Apr 27, 2014
returns undefined ?
View gist:11349911
var Sync = function(syncing, options) {
this.syncing = syncing;
this.url = syncing.url;
this.delay = syncing.delay;
}
_.extend(Sync.prototype, {
findAll: Promise.method(function() {
var sync = this;
return Promise.bind(this).then(function() {
@mulderp
mulderp / gist:22174782ebe36bce0c50
Created May 21, 2014
get access token via Twitter oauth
View gist:22174782ebe36bce0c50
#!/usr/bin/env node
var argv = require('optimist')
.usage('Usage: --key=[consumer key] -secret=[consumer secret]')
.demand(['key', 'secret'])
.argv
;
var OAuth = require('oauth').OAuth;
var Step = require('step');
View gist:890eb3b7473b98a3a91a
curl --include --request GET "http://www.kimonolabs.com/api/ebkx0v2e?apikey=e228ca86c4c0624bfc30722ea22d7180"
You can’t perform that action at this time.