Skip to content

Instantly share code, notes, and snippets.

Privacy Policy
This privacy policy discloses the privacy practices for Who Posted That. This privacy policy applies solely to information collected by this web site. It will notify you of the following:
What personally identifiable information is collected from you through the web site, how it is used and with whom it may be shared.
What choices are available to you regarding the use of your data.
The security procedures in place to protect the misuse of your information.
How you can correct any inaccuracies in the information.
Information Collection, Use, and Sharing
We are the sole owners of the information collected on this site. We only have access to/collect information that you voluntarily give us via email or other direct contact from you. We will not sell or rent this information to anyone.
Sample Privacy Policy
This privacy policy discloses the privacy practices for Who Posted That. This privacy policy applies solely to information collected by this web site. It will notify you of the following:
What personally identifiable information is collected from you through the web site, how it is used and with whom it may be shared.
What choices are available to you regarding the use of your data.
The security procedures in place to protect the misuse of your information.
How you can correct any inaccuracies in the information.
Information Collection, Use, and Sharing
We are the sole owners of the information collected on this site. We only have access to/collect information that you voluntarily give us via email or other direct contact from you. We will not sell or rent this information to anyone.
// truncated version of app.js
var express = require('express');
var app = module.exports = express();
var routes = require('./routes/index');
app.use('/', routes(app));
app.use('/tweets', require('./routes/tweets')(app));
app.use('/game', require('./routes/game')(app));
@DavidQL
DavidQL / gist:9302697
Created March 2, 2014 06:19
CurrentUserHelper - Ember.js
// define
App.CurrentUserHelper = {
beforeModel: function() {
if (!this.controllerFor('application').get('currentUser')) {
var auth_deferred = $.get(App.Host + '/session');
auth_deferred.then(function(user) {
this.controllerFor('application').set('currentUser', user);
}.bind(this));
Backbone.ajax = function(params) {
var request_type = params.type,
url = params.url,
deferred = $.Deferred();
if (request_type === "GET") {
appAPI.request.get({
url: url,
onSuccess:function(response, additional_info) {
params.success(JSON.parse(response));
c7 45 f8 01 00 00 00 movl $0x1,-0x8(%rbp)
c7 45 f4 02 00 00 00 movl $0x2,-0xc(%rbp)
8b 45 f8 mov -0x8(%rbp),%eax
03 45 f4 add -0xc(%rbp),%eax
0x0000000100000e36 <main+22>: movl $0x1,-0x8(%rbp)
0x0000000100000e3d <main+29>: movl $0x2,-0xc(%rbp)
0x0000000100000e44 <main+36>: mov -0x8(%rbp),%eax
0x0000000100000e47 <main+39>: add -0xc(%rbp),%eax
<main+22>: movl $0x1,-0x8(%rbp)
<main+29>: movl $0x2,-0xc(%rbp)
<main+36>: mov -0x8(%rbp),%eax
<main+39>: add -0xc(%rbp),%eax
Dump of assembler code for function main:
0x0000000100000e20 <main+0>: push %rbp
0x0000000100000e21 <main+1>: mov %rsp,%rbp
0x0000000100000e24 <main+4>: sub $0x20,%rsp
0x0000000100000e28 <main+8>: mov 0x1e9(%rip),%rdi # 0x100001018
0x0000000100000e2f <main+15>: movl $0x0,-0x4(%rbp)
0x0000000100000e36 <main+22>: movl $0x1,-0x8(%rbp)
0x0000000100000e3d <main+29>: movl $0x2,-0xc(%rbp)
0x0000000100000e44 <main+36>: mov -0x8(%rbp),%eax
0x0000000100000e47 <main+39>: add -0xc(%rbp),%eax