This document is intended to be a simplified version of the OAuth 2.0 specification. In particular it has been written with implementors in mind, and as such attempts to trim the spec down to just what you need to implement an OAuth provider or client. It is necessarily not complete, but attempts to introduce spec requirements in the same order in which the protocol proceeds in practise, with everything you need to know about each protocol endpoint brought together in one place rather than scattered across a large document.
#!/usr/bin/env node | |
// this file is stored in a directory of APP_ROOT/script for me, all things are relative to that | |
var APP_ROOT = __dirname+"/../"; | |
// this assumes there is a file stored in APP_ROOT called "config.js" with the following structure: | |
// | |
// module.exports = { | |
// "development: { | |
// "postgresql": "tcp://postgres@localhost/dev-db" |
Backbone.Model::nestCollection = (attributeName, nestedCollection) -> | |
#setup nested references | |
for item, i in nestedCollection | |
@attributes[attributeName][i] = nestedCollection.at(i).attributes | |
#create empty arrays if none | |
nestedCollection.bind 'add', (initiative) => | |
if !@get(attributeName) | |
@attributes[attributeName] = [] | |
@get(attributeName).push(initiative.attributes) |
"use strict"; | |
var restify = require("restify"); | |
var users = require("./users"); | |
// The users module will have a getAuthorizationFromAccessTokenAsync promise-returning export. (Convert to callbacks if you wish). | |
// It rejects in cause of not authorized, or fulfills with a { scope, customerId } object if the user is authorized. | |
// The scope property indicates which scopes the user corresponding to a given access token has. | |
module.exports = function authPlugin(serverRequest, serverResponse, next) { |
# A bunch of the stuff above relies on this, especially the aliases. | |
[user] | |
# you probably want to change this bit. | |
name = isaacs | |
email = i@izs.me | |
signingkey = 0x6C481CF6 | |
[alias] | |
ci = commit | |
st = status | |
br = branch |
There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.
-
Get a Linode VM in the UK. The 512MB server for $20 works just fine. (If you want to use my referral link, go for it: http://bit.ly/OuzdVe)
-
Follow the standard OpenVPN installation documentation. (Basically, 'apt-get install openvpn' or 'yum install openvpn' and then follow these docs: http://openvpn.net/index.php/open-source/documentation/howto.html). For an OS X client, I prefer Viscosity: http://www.thesparklabs
WARNING
This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!
An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars
.
<header>
var faye = require('faye'), | |
nopt = require('nopt'), | |
jstest = require('./jstest'), | |
port = 7337, | |
params = nopt({format: String}) | |
var server = new faye.NodeAdapter({mount: '/'}), | |
client = new faye.Client('http://localhost:' + port + '/'), | |
queue = [], |
This is a brain dump of my experience trying to get something going with Ember.js. My goal was to get to know the ins and outs of the framework by completing a pretty well defined task that I had lots of domain knowledge about. In this case reproducing a simple Yammer feed. As of this time, I have not been able to complete that task. So this is a subjective rundown of the things I think make it difficult to get a handle on Ember. NOTE: My comments are addressing the Ember team and giving suggestions on what they could do to improve the situation.
The new guides have pretty good explanation of the various parts of the framework; routers, models, templates, views. But it's not clear how they all get strapped together to make something that works. There are snippets of examples all over the place like:
App.Router.map(function() {
match('/home').to('home');
});
{ | |
"directory": "vendor/assets/components" | |
} |