Skip to content

Instantly share code, notes, and snippets.

View luetkemj's full-sized avatar
🌄
Working from home

Mark Luetke luetkemj

🌄
Working from home
View GitHub Profile
@thebyrd
thebyrd / magicMethod.js
Last active December 19, 2015 05:49
Adds jQuery style getters and setters to a given constructor function.
Function.prototype.method = function (name, func) {
this.prototype[name] = func;
return this;
}
var getParamNames = function (func) {
var funStr = func.toString()
return funStr.slice(funStr.indexOf('(')+1, funStr.indexOf(')')).match(/([^\s,]+)/g)
}
@brantfaircloth
brantfaircloth / newpost.rb
Created October 3, 2010 07:23 — forked from al3x/newpost.rb
start jekyll post from commandline and stage
#!/usr/bin/ruby
# Create new jekyll post and open in textmate
# $ ruby _new.rb This is the title
# The arguments form the title
unless ARGV[0]
raise "Please provide a post title."
end