Skip to content

Instantly share code, notes, and snippets.

harthur / perl -v output
Created Jul 10, 2012
Firefox Perl configure error
View perl -v output
fx-team $ make -f configure
cp /Users/harth/hgs/fx-team/mozconfig obj-x86_64-apple-darwin10.8.0/.mozconfig
cd obj-x86_64-apple-darwin10.8.0
Adding configure options from /Users/harth/hgs/fx-team/mozconfig:
loading cache ./config.cache
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
checking build system type... x86_64-apple-darwin10.8.0
harthur /
Created Jun 18, 2012
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
harthur / fetchgrams.js
Created May 2, 2012
Download pictures with cat tag from Instagram
View fetchgrams.js
var http = require("http"),
url = require("url"),
fs = require("fs"),
async = require("async"),
Instagram = require('instagram-node-lib');
Instagram.set('client_id', /* client key */);
Instagram.set('client_secret', /* client secret */);
fetchTag('cat', 400);
harthur / renderedfont.js
Created Apr 18, 2012
Get rendered font-family
View renderedfont.js
function getRenderedFontFamily(fontFamily) {
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
let families = fontFamily.split(/\s*,\s*/);
for each (let family in families) {
if (family == 'inherit') {
return family;
harthur / gist:2310787
Created Apr 5, 2012
`brew doctor` output
View gist:2310787
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
harthur / scratchpad.js
Created Mar 22, 2012 — forked from paulrouget/scratchpad.js
Firefox Magnifier
View scratchpad.js
- zoom level menu
- need to find a way to re-start the update
- add color tools
- integrate better in Firefox
- crosshair has a 1px offset
View tweets.js
var ntwitter = require("ntwitter"),
growl = require("growl");
var twitter = new ntwitter({
// fill in w/ keys from
consumer_key: null,
consumer_secret: null,
access_token_key: null,
access_token_secret: null
harthur / lexicon.js
Created Sep 20, 2011
Problem require'ing a huge module in CouchDB CommonJS
View lexicon.js
module.exports = {
"Ranavan": [
"fawn": [
"pro-Soviet": [
View gist:1076306
var async = require("async"),
github = new (require("github").GitHubApi)(),
users = github.getUserApi(),
names = require("./femalenames").slice(0, 50),
cradle = require("cradle"),
fs = require("fs");
var toFollow = [];
function dateAgo(daysAgo) {
harthur / gist:992175
Created May 25, 2011
repos from the first Silicon Valley Hack and Tell meetup
View gist:992175