Skip to content

Instantly share code, notes, and snippets.

View skylar's full-sized avatar

Skylar Woodward skylar

  • New York, NY
  • 01:28 (UTC -04:00)
  • X @skylar
View GitHub Profile
require("sproutcore");
Kivakity = SC.Application.create();
Klb.COUNTRIES_ISO = [
{"iso_code":"AF",
"iso_name":"AFGHANISTAN",
"name":"_AFGHANISTAN".loc(),
"region":"xx"},
{"iso_code":"AX",
"iso_name":"ÅLAND ISLANDS",
"name":"_ÅLAND_ISLANDS".loc(),
"region":"xx"}];
// in core.js...
Klb.PARTNER_QUERY = SC.Query.local(Klb.Partner);
Klb.LOAN_QUERY = SC.Query.local(Klb.Country, {conditions: 'status = "fundraising"', orderBy: ['dateAdded']});
// in controller...
availablePartners: null,
availableCountries: null,
/*
* Returns the URL to call piwik.php,
* with the standard parameters (plugins, resolution, url, referer, etc.)
*/
function getRequest() {
var i, now, request;
now = new Date();
request = 'idsite=' + configTrackerSiteId +
'&url=' + escapeWrapper(documentAlias.location.href) +
'&res=' + screenAlias.width + 'x' + screenAlias.height +
#!/usr/bin/ruby
require 'net/http'
require 'rexml/document'
require 'cgi'
#setup
method_name = 'loans'
endpoint_prefix = 'http://api.kivaws.org/v1'
methods = {'loans' => '/loans/newest.json', 'partners' => '/partners.json' }