Skip to content

Instantly share code, notes, and snippets.

@briehanlombaard
briehanlombaard / canvas_grid.html
Created January 25, 2012 15:20
Canvas grid generator thing
<!doctype html>
<head>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #f5f5f5;
@briehanlombaard
briehanlombaard / parse_bookmarks.py
Created April 4, 2012 14:07
Parse netscape bookmarks file
#! /usr/bin/env python
import sys
try:
import json
except ImportError:
import simplejson as json
from BeautifulSoup import BeautifulSoup
#!/bin/bash
q=`python -c "import sys, urllib as ul; print ul.quote_plus('${1}')"`
url=`echo https://encrypted.google.com/search?q=$q`
w3m $url
@briehanlombaard
briehanlombaard / ddg.sh
Created April 25, 2012 14:01
DuckDuckGo
#!/bin/bash
q=`python -c "import sys, urllib as ul; print ul.quote_plus('${1}')"`
url=`echo "https://duckduckgo.com/?kh=1&kj=w&ky=-1&kz=-1&k1=-1&k4=-1&q=$q"`
w3m $url
var _ = require('underscore')._,
fs = require('fs'),
path = require('path'),
less = require('less');
module.exports = function lessify(options) {
var settings = _.extend({
cache: process.env.NODE_ENV && process.env.NODE_ENV == 'production',
source: 'less',
destination: 'css',
var crypto = require('crypto');
module.exports.namespace = {
dns: '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
url: '6ba7b811-9dad-11d1-80b4-00c04fd430c8',
oid: '6ba7b812-9dad-11d1-80b4-00c04fd430c8',
x500: '6ba7b814-9dad-11d1-80b4-00c04fd430c8'
};
// returns a closure around the given algorithm
#!/usr/bin/env python
import sys
import urllib2
try:
import simplejson as json
except ImportError:
import json
/*
* Returns the head of the list `lst`.
*
* head([1,2,3]) => 1
*/
function head(lst) {
return lst[0];
}
/*
(function($) {
$('#gform_1').change(function(e) {
try {
localStorage.setItem('gform_1', JSON.stringify($(this).serializeArray()));
} catch (e) {
console.error('Local storage quota exceeded.');
}
});
.gform_wrapper table.gfield_list thead th {
font-weight: normal;
text-transform: none;
}
input, textarea {
margin-bottom: 0;
}
.gform_wrapper .top_label .gfield_label {
margin-top: 20px !important;
text-transform: uppercase;