Skip to content

Instantly share code, notes, and snippets.

@bavey
bavey / svn-list-last-tag
Created August 1, 2013 01:27
SVN: list last tag
svn ls http://example.com/svn/example/tags/qa | cut -d "/" -f 1 | sort -t . -k 1,2n -k 2,2n -k 3,2 | tail –n1
@bavey
bavey / json-stringify
Created July 23, 2013 20:32
Stringify JSON object.
var testObject = { 'one': 1, 'two': 2, 'three': 3 };
// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));
console.log(JSON.stringify(testObject));
// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');
@bavey
bavey / index.html
Created July 20, 2013 21:57
A CodePen by David DeSandro. Loader dots - Lamer version of http://codepen.io/jshawl/pen/IFxBK
<div class="loader">
<div class="dot dot1"></div>
<div class="dot dot2"></div>
<div class="dot dot3"></div>
<div class="dot dot4"></div>
</div>
@bavey
bavey / server.js
Created July 20, 2013 16:49
Setup a simple Node.js server
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end('<html><body>' + request.url + '</body></html>');
console.log(request.url);
}).listen(3000, 'localhost');
@bavey
bavey / python-server.txt
Created July 12, 2013 20:37
Spin up local Python server
python -m SimpleHTTPServer