Skip to content

Instantly share code, notes, and snippets.

View wavded's full-sized avatar
🐢
Turtles all the way

Marc Harter wavded

🐢
Turtles all the way
View GitHub Profile
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
var sys = require("sys")
var http = require("http");
var twitter = http.createClient(80, "search.twitter.com");
var count = 10
for (var i = 1; i <= count; i++) {
var request = twitter.request("GET", "/search.json?q=crockfordfact+OR+crockfordfacts&rpp=100&page=" + i, {"host": "search.twitter.com"});
request.addListener('response', function(response) {
if (!navigator.geolocation) {
navigator.geolocation = (function (window) {
function getCurrentPosition(callback) {
// NOTE: for some reason, chaging the url is *allowed* with this service. Useful, but random
// source: http://www.maxmind.com/app/javascript_city
// The source is open source, as per: http://www.maxmind.com/app/api, but doesn't discuss specific license use. Hopefully it's just free to use - yay internet!
var geourl = 'http://j.maxmind.com/app/geoip.js_' + Math.random(),
iframe = document.createElement('iframe'),
doc, win;
@wavded
wavded / gist:252771
Created December 9, 2009 20:17 — forked from kangax/gist:252265
/*
evaluates as a block — "{" and "}" — containing one labeled statement — `a:"a"`.
labeled statement, in its turn, evaluates to "a".
*/
{a:"a"}
/*
evaluates as an expression, where "(" and ")" are grouping operator and "{" and "}" constitute an object literal.
evaluates to this object value.