Skip to content

Instantly share code, notes, and snippets.

View barkerja's full-sized avatar
🏠
I have the complete picture — This changes the picture entirely

John Barker barkerja

🏠
I have the complete picture — This changes the picture entirely
  • Dryden, NY
View GitHub Profile
@barkerja
barkerja / downloader.js
Created January 13, 2012 09:08 — forked from carlosedp/downloader.js
downloader.js
var http = require("http");
var url = require("url");
var fs = require("fs");
var sys = require('sys');
var config = require('./config');
var emailer = require('./emailer').emailer;
var appLogger = require('./logger').appLogger;
var downloadDirSuffix = config.downloadDirSuffix;
var downloadDir = config.downloadDir;
@barkerja
barkerja / gist:1437182
Created December 6, 2011 07:22
PHP Late Static Binding
<?php
class Foo {
public static function name() {
echo __CLASS__;
}
}
/* This is a template command. */
CmdUtils.CreateCommand({
name: "example",
icon: "http://example.com/example.png",
homepage: "http://example.com/",
author: {name: "Your Name", email: "you@example.com"},
license: "GPL",
description: "A short description of your command",
help: "How to use your command",
takes: {"input": /.*/},
<?php
/**
* Brightkite PHP Object to do basic things such as checkin, post a note, and search
* for location.
*
* This object is chain-able.
* Ex:
* Brightkite::factory()->current_location()->note('new note');
* Brightkite::factory()->address('San Francisco, CA')->checkin()->note('new note');