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
<?php | |
$randint = mt_rand(); | |
$client_id = '<app ID goes here>'; | |
$client_secret = '<app secret goes here>'; | |
if ($_GET['code']) { | |
$code = $_GET['code']; | |
$state = $_GET['state']; | |
$url = 'https://github.com/login/oauth/access_token'; |
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 path = require('path'), | |
express = require('express'), | |
http = require('http'), | |
mongoose = require('mongoose'), | |
passport = require('passport'), | |
passportLocalMongoose = require('passport-local-mongoose'), | |
BasicStrategy = require('passport-http').BasicStrategy; | |
var app = express(); |
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
the following action: | |
deleteCategory: function() { | |
var self = this; | |
var removedCategory = this.get('model'); | |
removedCategory.deleteRecord(); | |
removedCategory.save().then(function(result) { | |
var org = removedCategory.get('organization'); | |
org.get('categories').removeObject(result); | |
org.save().then(function() { |
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
Ember CLI - Stefan Penner | |
npm install -g ember-cli | |
ember new project-name | |
ember server or ember server --port xxxx to run on a specific port. | |
ember test (runs testem behind the scenes) | |
then it's just localhost:7357/tests | |
completely seperate front-end and backend code -- make them two different apps | |
testem is the test runner suite used by default in ember-cli |
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
//Brocfile.js | |
/* global require, module */ | |
var EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
var pickFiles = require('broccoli-static-compiler'); | |
var mergeTrees = require('broccoli-merge-trees'); | |
var app = new EmberApp({ | |
name: require('./package.json').name, |
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
saveOrganization: function() { | |
var org = this.get('model'); | |
var users = org.get('users').then(function() { | |
console.log(org); | |
}); | |
} |
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
Seattle API Meeting Notes | |
John Musser @johnmusser / API Science @apiscience | |
10 Reasons Developers Hate Your API | |
Documentation: | |
Good Examples: | |
https://www.twilio.com/docs | |
https://stripe.com/docs/api |
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
Notes from SeattleJS meetup on 8/14/14 | |
Nodebots | |
Parts Needed: | |
Breadboard | |
Arduino | |
Software Installs: | |
Git | |
Node | |
Arduino Software |
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
Dev Jumpstart: Build Your First App with MongoDB | |
docs.mongodb.com | |
mongodb university | |
---- | |
Social Network created by Mongo | |
https://github.com/10gen-labs/socialite |
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
//application controller: | |
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
renderTemplate: function() { | |
// Render default outlet | |
this.render(); | |
// render extra outlets | |
this.render("topnav", { |
OlderNewer