Skip to content

Instantly share code, notes, and snippets.

View notjosh's full-sized avatar

Joshua May notjosh

View GitHub Profile
@notjosh
notjosh / x
Created November 7, 2008 07:14
CmdUtils.CreateCommand({
name: 'tabs',
description: 'Count the number of tabs and windows you have open',
icon: 'https://addons.mozilla.org/img/app-icons/firefox.png',
author: { name: 'Joshua May', email: 'notjosh@gmail.com'},
homepage: 'http://notjosh.com/',
execute: function()
{
var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
var counts = this._count(wm);
shows the number of tabs (and windows) via the `tabs` command in ubuquity
@notjosh
notjosh / x
Created November 7, 2008 07:22
CmdUtils.CreateCommand({
name: 'tabs',
description: 'Count the number of tabs and windows you have open',
icon: 'http://www.spreadfirefox.com/files/spreadfirefox_RCS_favicon.png',
author: { name: 'Joshua May', email: 'notjosh@gmail.com'},
homepage: 'http://notjosh.com/',
execute: function()
{
var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
var counts = this._count(wm);
#include <iostream>
#include <ctime>
using namespace std;
// here's the class. a constructor, the subtraction operator and the date property
class qDate
{
public:
explicit qDate(time_t aDate);
compo@compos-Mac-mini ~ » npm list
/Users/compo
└─┬ node.io@0.3.3
├── coffee-script@1.1.1
├── htmlparser@1.7.3
└─┬ jquery@1.6.2
└─┬ jsdom@0.2.0
└── request@1.9.8
compo@compos-Mac-mini ~ » npm list -g
/usr/local/lib
var nodeio = require('node.io');
exports.job = new nodeio.Job({max: 1, retries: 1, auto_retry: false, jsdom: true }, {
/* init: function () {
//The initial input is page 1 of search results
this.input = ["http://www.nuffieldtheatre.co.uk/events/category/C81/"];
},*/
input: ["http://www.nuffieldtheatre.co.uk/events/category/C81/"],
run: function (search_page) {
@notjosh
notjosh / NSDate+Comparison.h
Created November 9, 2011 13:38
NSDate+Comparison - adios NSOrdered*
//
// NSDate+Comparison.h
//
// Created by Joshua May on 4/11/11.
// Copyright (c) 2011 Joshua May. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (Comparison)
@notjosh
notjosh / balance.rb
Created November 19, 2011 18:27
ABN Amro credit card balance checker
#! /usr/bin/env ruby
# Password can be fetched from Keychain
# Password should be stored with the same username, and application name 'abnamro-credit-card'
HOST = 'https://creditcards.abnamro.nl'
LOGIN_URL = HOST + '/ABN_AMRO_Consumer/Login.do'
LOGIN_POST_URL = HOST + '/ABN_AMRO_Consumer/ProcessLogin.do'
ENGLISH_URL = HOST + '/ABN_AMRO_Consumer/ChangeLanguage.do?localeID=English&locationID=Transactions'
@notjosh
notjosh / JPodCinderApp.cpp
Created April 13, 2012 21:42
JPod ticker (Cinder)
#include "cinder/app/AppBasic.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
#define NUMBER_OF_COLUMNS 12
#define NUMBER_OF_ROWS 6
@interface CharacterSprite : CCSprite
@property (nonatomic, strong) HelloWorldLayer *layer;
@property (nonatomic, strong) CCAnimation *facingForwardAnimation;
@property (nonatomic, strong) CCAnimation *facingBackAnimation;
@property (nonatomic, strong) CCAnimation *facingLeftAnimation;
@property (nonatomic, strong) CCAnimation *facingRightAnimation;
@property (nonatomic, strong) CCAnimation *curAnimation;
@property (nonatomic, strong) CCAnimate *curAnimate;