Skip to content

Instantly share code, notes, and snippets.

View matthewgertner's full-sized avatar

Matthew Gertner matthewgertner

View GitHub Profile
import React, { PropTypes } from 'react';
import Portal from 'react-portal';
import Tooltip from 'react-portal-tooltip';
const withClickOutside = require('react-onclickoutside');
import '../assets/style.less';
const BEACON_HEIGHT = 30;
const BEACON_WIDTH = 30;
@matthewgertner
matthewgertner / country.js
Created January 29, 2014 08:16
Uses Google Suggest API to get the most popular adjective for each country in the list matching the template "why is this [country] so [adjective]".
var countries = [
'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua & Deps',
'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas',
'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize',
'Benin', 'Bhutan', 'Bolivia', 'Bosnia Herzegovina', 'Botswana', 'Brazil',
'Brunei', 'Bulgaria', 'Burkina', 'Burundi', 'Cambodia', 'Cameroon', 'Canada',
'Cape Verde', 'Central African Rep', 'Chad', 'Chile', 'China', 'Colombia',
'Comoros', 'Congo', 'Congo {Democratic Rep}', 'Costa Rica', 'Croatia',
'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica',
'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador',
/*
* grunt-package-minifier
*
*
* Copyright (c) 2013 Matthew Gertner
* Licensed under the MIT license.
*/
'use strict';
var chai = require('chai'),
expect = chai.expect,
Binder = require('../../../code/firefox/js/binder');
function TestObject() {
}
TestObject.prototype = {
method: function() {
return 42;
(function() {
var methodCache = {};
function Binder(thisArg, methodName) {
this._thisArg = thisArg;
this._methodName = methodName;
}
Binder.prototype = {