This file contains 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
'use strict'; | |
module.exports = function(io, pub, sub) { | |
sub.subscribe('discussion'); | |
console.log('subscribing'); | |
io.on('connection', function(socket) { | |
var token = socket.decoded_token; | |
if (!token) { return; } | |
console.log('listening to conn'); |
This file contains 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
// Initial log in, can only ask to read | |
// type permissions | |
[FBSession | |
openActiveSessionWithReadPermissions:permissions | |
allowLoginUI:YES | |
completionHandler:^(FBSession *session, | |
FBSessionState state, | |
NSError *error) { | |
[self sessionStateChanged:session |
This file contains 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
[FBSession openActiveSessionWithReadPermissions:nil | |
allowLoginUI:NO | |
completionHandler:^(FBSession *session, | |
FBSessionState state, | |
NSError *error) { | |
[self sessionStateChanged:session | |
state:state | |
error:error]; | |
}]; |
This file contains 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
namespace :docker do | |
task :push => ['docker:push:api', 'docker:push:worker', 'docker:push:cron', 'docker:clean'] | |
task :build => ['docker:build:api', 'docker:build:worker', 'docker:build:cron'] | |
task :clean => ['docker:clean:api', 'docker:clean:worker', 'docker:clean:cron', 'docker:clean:file'] | |
task :deploy => ['docker:build', 'docker:push'] | |
namespace :build do | |
task :api do | |
sh 'ln -snf Dockerfile.api Dockerfile' |
This file contains 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 gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var fs = require('fs'); | |
var replace = require('gulp-replace-task'); |
This file contains 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
define(['jquery', 'lib/appcontext', 'lib/exceptions'],function(jquery, app, errors){ | |
'use strict'; | |
var XhrTransport = function(){ | |
this.initialize(); | |
}; | |
XhrTransport.prototype = { |
This file contains 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/env puma | |
# app do |env| | |
# puts env | |
# | |
# body = 'Hello, World!' | |
# | |
# [200, { 'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s }, [body]] | |
# end |
This file contains 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
--- | |
:concurrency: 5 | |
:pidfile: tmp/pids/sidekiq.pid | |
staging: | |
:concurrency: 10 | |
production: | |
:concurrency: 20 | |
:queues: | |
- default | |
- [group, 5] |
This file contains 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
/*global require*/ | |
'use strict'; | |
require.config({ | |
shim: { | |
bootstrap: { | |
deps: ['jquery'], | |
exports: 'jquery' | |
} | |
}, |