Sex ratio at birth in Vietnam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var links = document.getElementsByTagName('a') | |
var map = [].map | |
var hrefs = map.call(links, function(l) {return l.href}) | |
hrefs = hrefs.filter(function(h){ return h.match('mobi')}) | |
for (var i=100; i < 300; i++) { | |
window.open(hrefs[i]) | |
} |
Visualizing Vietname population density by provinces/cities.
Go to PayPal's Developer Website, sign in with your PayPal account, click "Applications" then "Sandbox Accounts" and create a new "Business" account. Once the account is created, click on the triangle next to its email address, then "Profile". The "API Credentials" tab will provide your API credentials (probably). If this tab is blank, try refreshing the page.
You will also need a "Personal" account to test the transactions on your site. Create this in the same way, finding the account information under "Profile" as well. You may need to set a password in order to be able to log in to PayPal's sandbox for this user.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
site "http://community.opscode.com/api/v1" | |
cookbook "pivotal_workstation" , :git => "https://github.com/pivotal/pivotal_workstation" | |
cookbook "neo_workstation" , :git => "https://github.com/neo/neo_workstation" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Phpunit < Formula | |
homepage 'http://www.phpunit.de/manual/current/en/index.html' | |
url 'https://phar.phpunit.de/phpunit.phar' | |
sha1 'dc693b34a62644f61cfc01a22d9654ff4b8764af' | |
version 'HEAD' | |
def install | |
bin.install "phpunit.phar" => "phpunit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secret = ENV['SECRET_TOKEN'] | |
if secret.length < 30 | |
raise "Secret token cannot be loaded" | |
else | |
Rails.application.config.secret_token = secret | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = indexedDB.open('beer_czar'); | |
request.onsuccess = function(event){ | |
var db = event.target.result; | |
var transaction = db.transaction(['beer'], 'readwrite'); | |
transaction.oncomplete = function(event){ | |
// handle transaction errors here | |
} | |
var beerObjectStore = transaction.objectStore('beer'); | |
var operation = beerObjectStore.add(beer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@schema = IndexedDBBackbone.describe('experiment1') | |
.createStore('catalog_items', keyPath: 'id') | |
.createStore('inventory_items', keyPath: 'id') | |
.createIndex('catalog_items', 'serializedIndex', 'serialized', unique: false) | |
.createIndex('catalog_items', 'categoryIndex', 'category_id', unique: false) | |
.createIndex('inventory_items', 'locationIndex', 'location_id', unique: false) | |
.createIndex('inventory_items', 'catalogItemIndex', 'catalog_item_id', unique: false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@schema = IndexedDBBackbone.describe('experiment1') | |
.createStore('catalog_items', keyPath: 'id') | |
.createStore('inventory_items', keyPath: 'id') | |
.createIndex( 'catalog_items', | |
'queryIndex', | |
['serialized', | |
'category_id', | |
'locations_with_quantity'], | |
{ unique: false, multiEntry: true }) | |
.createIndex('inventory_items', 'catalogItemIndex', 'catalog_item_id', unique: false) |