Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View danheberden's full-sized avatar

Dan Heberden danheberden

View GitHub Profile
@danheberden
danheberden / jqtotals.js
Last active December 20, 2015 21:09
get eventbrite totals
var sales = {training: 0, conf: 0, team: 0, speaker: 0};
jQuery('#ticketsSalesDiv tr').each(function(i, tr) {
var row = jQuery(tr);
var columns = row.find('td');
var fields = [];
columns.each(function(i, td) {
var column = jQuery(td);
if(i < 1) {
jQuery.each(sales, function(k, v) {
var reg = new RegExp(k, 'i');
13:21 danheberden: distilled my ideas into a gist https://gist.github.com/danheberden/279afd863b3144a64885
13:22 kevva`off is now known as kevva
13:23 ccverg has left ()
13:24 satazor has joined (~satazor@a213-22-2-212.cpe.netcabo.pt)
13:28 zz_luisbug is now known as luisbug
13:32 marcooliveira: brb
13:32 marcooliveira has left IRC (Remote host closed the connection)
13:33 wibblymat_ has left IRC (Ping timeout: 256 seconds)
13:44 paulmillar has joined (4d789b64@gateway/web/freenode/ip.77.120.155.100)
13:49 addyosmani: bowerrrr powerrr.
success: function(data) {
if(data == 'error') {
} else {
var span = $('<span class="label label-success"><strong>Success</strong></span>');
$this.closest('tr').find('td').first().append( span );
// after 3 seconds...
setTimeout(function(){
// hide the span, once that's done, remove it
span.hide( 'normal', function() {
@danheberden
danheberden / everything.md
Last active January 4, 2024 08:38
Mozilla FirefoxOS notes

FirefoxOS, B2G, gaia and YOU

Getting setup for work on gaia

Overview

FirefoxOS (or B2G - Boot To Gecko) is comprised of three core pieces. Gonk, Gaia and Gecko.

Gonk is the core of the OS, consisting of a linux kernel and HAL layer (parts of which are shared with android for things like Camera, GPS, etc).

@danheberden
danheberden / bug_report.js
Created December 26, 2012 16:30
Problem with .then in underscore.deferred?
var Deferred = require( 'underscore.deferred' );
// using then won't throw any exceptions
var d1 = Deferred.Deferred();
d1.then( function( a ) {
console.log( 'success', a );
missing_var.destruction;
});
d1.resolve( 'test' );
var http = require('http');
var static = require('node-static');
grunt.registerTask( 'server', "Create a preview server", function( port ) {
var done = this.async();
port = port || 8080;
var fileServer = new static.Server('./');
@danheberden
danheberden / all.js
Created September 18, 2012 16:09
Gith: All actions example
var gith = require( 'gith' ).create( 9001 );
gith().on( 'all', function( payload ) {
/* update the website! */
});
@danheberden
danheberden / file-add-filtered.js
Created September 18, 2012 16:08
Gith: File:add of specific match to repo example
var gith = require( 'gith' ).create( 1337 );
gith({
repo: 'danheberden/gith',
file: /^test\/payloads/
}).on( 'file:add', function( payload ) {
/* files were added to /test/payloads in danheberden/gith */
});
@danheberden
danheberden / file-add-repo.js
Created September 18, 2012 16:07
Gith: File:add to repo example
var gith = require( 'gith' ).create( 9001 );
gith({
repo: 'danheberden/gith'
}).on( 'file:add', function( payload ) {
console.log( 'these files were added', payload.files.added );
});
LIB_DIR="/usr/local/lib/nave"
LIB_NAVE="$LIB_DIR/nave.sh"
BIN_NAVE="/usr/local/bin/nave"
ALIAS_NAVE="alias nave-update=\"cd /usr/local/lib/nave; git pull; cd > /dev/null 2>&1\""
echo "##########################################################################"
echo "Installing nave..."
echo "See http://github.com/isaacs/nave for more information"
echo ""
if [ -f "$LIB_NAVE" ]; then