Skip to content

Instantly share code, notes, and snippets.

John Tantalo tantalor

Block or report user

Report or block tantalor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tantalor / original.js
Created Apr 3, 2012
Mozilla Notification API
View original.js
var notification = navigator.mozNotification;
if (notification && notification.requestRemotePermission) {
// Ask the user to allow notifications.
var request = notification.requestRemotePermission();
request.onsuccess = function() {
var url = request.result;
console.log('New push URL: ' + url);
// We got a new push URL, store it on the server.'/push-urls/', {url: url});
tantalor / gist:2244383
Created Mar 29, 2012 — forked from jedsundwall/gist:2244379
hacking google spreadhseets
View gist:2244383
function makeURL(firstname,lastname) {
var name = firstname + lastname;
if (!name) {
return null;
} else {
return name;
View moon.html
<body style="background: black">
<a href="">
<img src="" style="width:24.3px;height:24.3px">
import thor
tantalor / Custom.css
Created Jan 18, 2012
Wikipedia Blackout Blocker
View Custom.css
#mw-page-base, #mw-head-base, #content,
#mw-head, #mw-panel, #footer {
display: block !important;
#mw-sopaOverlay {
display: none !important;
tantalor / go.js
Created Oct 10, 2011
Prime sieve in Go-flavored JavaScript
View go.js
#!/usr/bin/env node
var sys = require('sys');
function go (fn) {
setTimeout(fn, 0);
var chan = function () {
this.readers = []; // [cb, ...]
tantalor / generator.js
Created Apr 20, 2011
buffering asynchronous iterator pattern
View generator.js
// produce: accepts a cb which is called with an array of items
// initial: initial array of results to return
// returns a function which accepts a cb which is called with one item
// each time it is called
function generator(produce, initial) {
var items;
var waiting = [];
var next = function (cb) {
if (items && items.length) {
View html.js
{"html": "line<br>break"}
tantalor /
Created Mar 12, 2011
Combines svn blame and diff.
use strict;
use List::Util 'max';
my ($from, $to) = @ARGV
or die "usage: $0 OLD-URL[\@OLDREV] NEW-URL[\@NEWREV]\n";
my @diff = `svn diff $from $to` or die;
my @blame = map {/^\s*(\d+)/} `svn blame $to` or die;
tantalor / counters.js
Created Feb 15, 2011
Starcraft 2 counters for basic units (node)
View counters.js
ZERGLING = 'Zergling',
ROACH = 'Roach',
HYDRALISK = 'Hydralisk',
BANELING = 'Baneling',
MARINE = 'Marine',
HELLION = 'Hellion',
MARAUDER = 'Marauder',
REAPER = 'Reaper',
TANK = 'Siege Tank',
You can’t perform that action at this time.