Skip to content

Instantly share code, notes, and snippets.

View jimmed's full-sized avatar
:octocat:
#purrprogramming

Jim O'Brien jimmed

:octocat:
#purrprogramming
View GitHub Profile
@jimmed
jimmed / bootstrap.js
Last active August 29, 2015 14:26 — forked from Unitech/bootstrap
PM2 / Keymetrics for Heroku/Rackspace/Joyent/Amazon Elasticbeanstalk/Azure...
// Make sure you added pm2 as a dependency in your package.json
// Then in your Procfile, do a simple `node bootstrap.js`
var pm2 = require('pm2');
var MACHINE_NAME = 'hk1';
var PRIVATE_KEY = 'z1ormi9vomgq66';
var PUBLIC_KEY = 'oa0m7nuhdfibi16';
var instances = process.env.WEB_CONCURRENCY || 1; // Set by Heroku
import Facebook from 'appkit/initializers/facebook';
var FacebookAuthenticator = Ember.SimpleAuth.Authenticators.OAuth2.extend({
authenticate: function() {
var _this = this;
return new Ember.RSVP.Promise(function(resolve, reject) {
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
_this.facebookCallback().then(function(response) {
var expiresAt = _this.absolutizeExpirationTime(response.expires_in);
(function ($, window, undefined) {
$.fn.extend({
check2: function(option) {
var check2Class = 'check2',
conf = {
check2Class: check2,
offscreenClass: 'offscreen',
fontSize: '1.2em',
hasCheck2Class: [