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
| #!/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' } |
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
| /* | |
| * 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 + |
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
| // 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, |
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
| 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"}]; |
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("sproutcore"); | |
| Kivakity = SC.Application.create(); |
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
| skylar@dev-vm:~/kiva/main/sites/testing$ puppetd --test | |
| warning: peer certificate won't be verified in this SSL session | |
| err: Could not request certificate: Certificate retrieval failed: Certificate request does not match existing certificate; run 'puppetca --clean dev-vm.localdomain'. |
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 App = Em.Application.create(); | |
| App.Person = DS.Model.extend({ | |
| name: DS.attr('string') | |
| , location: DS.attr('string') | |
| }); | |
| var primaryKey = Ember.getPath('App.Merchant', 'proto.primaryKey'); | |
| // expected primaryKey to be 'id' |
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
| (function(exports) { | |
| window.DS = Ember.Namespace.create({ | |
| CURRENT_API_REVISION: 2 | |
| }); | |
| })({}); | |
| (function(exports) { |
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 'dm-core' | |
| require 'money' | |
| module DataMapper | |
| class Property | |
| class Money < String | |
| load_as ::Money | |
| dump_as ::Money | |
| coercion_method :to_money | |
| 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
| require 'dm-core' | |
| require 'money' | |
| module DataMapper | |
| class Property | |
| class Money < Object | |
| # load_as ::Money | |
| # dump_as ::String | |
| # coercion_method :to_money |
OlderNewer