An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| require 'rake-pipeline' | |
| require 'rake-pipeline/middleware' | |
| require 'net/http' | |
| require 'net/https' | |
| require 'uri' | |
| module Rack | |
| class Proxy | |
| def initialize(app, project, opts={}) |
| # for good measure | |
| @daily /etc/init.d/weinred restart |
| Viz.WidgetsController = Ember.ArrayController.extend | |
| init: -> | |
| @refresh() | |
| setInterval (=> @refresh), 5000 | |
| refresh: -> | |
| $.ajax | |
| url: @get('src'), | |
| type: "GET", | |
| context: this, |
| /static/sass/: | |
| screen.scss: (common stylesheet) | |
| phone.scss, tablet.scss, desktop.scss: (form factor-specific styles) | |
| /static/js/: | |
| libs/: (external libraries - DO NOT MODIFY) | |
| ember-and-friends.js | |
| jquery.js | |
| formfactor.js | |
| views/: (form-factor specific views) |
| // This file contains utilities for creating bound helpers | |
| // For reference: https://github.com/wagenet/ember.js/blob/ac66dcb8a1cbe91d736074441f853e0da474ee6e/packages/ember-handlebars/lib/views/bound_property_view.js | |
| Ember.Handlebars.BoundHelperView = Ember.View.extend(Ember._Metamorph, { | |
| context: null, | |
| options: null, | |
| property: null, | |
| // paths of the property that are also observed | |
| propertyPaths: [], |
| Person = Ember.Object.extend({ | |
| fullName: function() { | |
| var gender = this.get('gender'), parts, married; | |
| if (gender === "M") { | |
| parts = ["Mr."]; | |
| } else if (gender === "F") { | |
| married = this.get('married'); | |
| parts = [married ? "Mrs." : "Ms."]; | |
| } else { |
| PhoneNumber = Ember.Object.extend({ | |
| areaCode: null, | |
| number: null | |
| }); | |
| Person = Ember.Object.extend({ | |
| areaCode: function() { | |
| var areaCodes = {}, phoneNumbers = this.get('phoneNumber'); | |
| for (var i=0, l=phoneNumbers.length; i<l; i++) { |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| APPNAME = 'wh' | |
| require 'json' | |
| require 'rake-pipeline-web-filters' | |
| WebFilters = Rake::Pipeline::Web::Filters | |
| class LoaderFilter < WebFilters::MinispadeFilter | |
| def generate_output(inputs, output) | |
| inputs.each do |input| |
The rules for how Ember.js evaluates Handlebars templates have recently changed, and you may need to update your application's templates to ensure they continue working..
Remember that a template is always evaluated against a context object. When you render a template, values are looked up from that object. For example:
Hello, {{firstName}} {{lastName}}!