Skip to content

Instantly share code, notes, and snippets.

View ahawkins's full-sized avatar
💭
🌈🏄🏼‍♂️🤙🏻

Adam Hawkins ahawkins

💭
🌈🏄🏼‍♂️🤙🏻
View GitHub Profile
These responses should indicate the client should **NOT** make the request to the server for a month.
# Response 1
HTTP/1.1 200 OK
Expires: Sun, 07 Jul 2013 06:22:13 GMT
Content-Type: application/json; charset=utf-8
X-Ua-Compatible: IE=Edge
X-Request-Id: 917489f3971e43bb0ec932d1fcc188f2
X-Runtime: 1.535856
Server: WEBrick/1.3.1 (Ruby/2.0.0/2013-05-14)
require 'rack'
require 'rack/builder'
class DumbApp
def call(env)
[200, {}, [""]]
end
end
class Builder
require 'rack'
require 'rack/builder'
class DumbApp
def call(env)
[200, {}, [""]]
end
end
class Builder
require 'sinatra'
require 'multi_json'
class App < Sinatra::Application
configure do
# Don't log them. We'll do that ourself
set :dump_errors, false
# Don't capture any errors. Throw them up the stack
set :raise_errors, true
$.ajaxPrefilter(function(options) {
if(!options.data) {
options.data = {};
}
options.data.fooBar = 'en';
});
adam at mba in ~/emberfest/site[master*] ./boot
log4j:ERROR Could not parse url [file:/srv/netty-webserver/log4j.xml].
java.io.FileNotFoundException: /srv/netty-webserver/log4j.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:608)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
// Last commit: 5fd6d65 (2013-03-28 01:13:50 +0100)
(function() {
window.DS = Ember.Namespace.create({
// this one goes past 11
CURRENT_API_REVISION: 12
});
})();
@ahawkins
ahawkins / app.js
Last active December 15, 2015 07:39 — forked from radar/app.js
App = Ember.Application.create({});
App.Store = DS.Store.extend({
adapter: DS.RESTAdapter.create({
namespace: 'api',
serializer: DS.RESTSerializer.extend({
extractMeta: function(loader, type, json) {
this._super.apply(this, arguments);
delete json.count;
// Version: v1.0.0-pre.2-853-gb22afef
// Last commit: b22afef (2013-03-11 16:31:59 -0700)
(function() {
/*global __fail__*/
/**
Ember Debug
@ahawkins
ahawkins / scope.js
Last active December 14, 2015 21:49
DS.Model.reopenClass({
scope: function(name, fn) {
Ember.defineProperty(this, '_'+name+'Filter', Ember.computed(function() {
return this.filter(fn);
}));
Ember.defineProperty(this, name, Ember.computed('_'+name+'[email protected]', function() {
return this.get('_'+name+'Filter')
}));