This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Will McKenzie<www.oinutter.co.uk> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
// Attribution to http://blog.rassemblr.com/2011/04/a-working-static-file-server-using-node-js/ | |
var libpath = require('path'), | |
http = require("http"), | |
fs = require('fs'), | |
url = require("url")/* , | |
mime = require('mime') */; | |
var path = "."; | |
var port = 8080; |
/* Understanding vertical-align for once and for all */ | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
background: white; | |
} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
javascript:l=location+'',z=l.lastIndexOf('/');location='http://dabblet.com/gist'+l.slice(z);void(0); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
// At this time, grunt-mustache was giving me shit so I rewrote it for what I needed... | |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
mustache: { | |
template: { | |
src: 'template.svg.mustache', | |
dest: 'template.svg', | |
partials: 'partials/*.mustache' |
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
node -e "var f = './package.json', p = require(f), v = p.version || '0.0.0', a = v.split('.'), b; a[2] = +a[2] + 1; p.version = a.join('.'); require('fs').writeFileSync(f, JSON.stringify(p, null, 2));" |
(function () { | |
var watcher = new FileWatcher(), | |
resources = ResourceCollector.collect(); | |
watcher.addListener(function (url) { | |
// If the updated item is CSS | |
if (url.indexOf('css') !== -1) { | |
// Grab all of the links | |
[].slice.call(document.querySelectorAll('link')).forEach(function (link) { | |
// If the link's href matches, update it | |
var href = link.href; |