Skip to content

Instantly share code, notes, and snippets.

@ntlk
ntlk / bind.js
Last active August 29, 2015 14:25 — forked from threedaymonk/bind.js
if (!Function.prototype.bind) {
Function.prototype.bind = function bind(thisValue){
var func = this;
return function() {
return func.apply(thisValue, arguments);
}
}
}
@ntlk
ntlk / PHP on Pow - config.ru
Last active December 11, 2015 07:09 — forked from brookr/config.ru
Run any site on pow instead of apache
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around wordpress issues - Patrick Anderson (patrick@trinity-ai.com)
# clearly this could be cleaner, but it does work
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
# patch Php from rack-legacy to substitute the original request so
# WP's redirect_canonical doesn't do an infinite redirect of /
@ntlk
ntlk / pygments.css
Created December 4, 2012 13:40 — forked from zmanji/pygments.css
Solarized Pygments Dark CSS
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e
@ntlk
ntlk / html5.haml
Created September 26, 2011 20:53 — forked from fnhipster/html5.haml
HTML5 HAML Template
!!! 5
%html{ :lang => "en"}
%head
%title= "Your Website"
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }