Skip to content

Instantly share code, notes, and snippets.

var app = angular.module('app', ['ngResource']);
app.config(function($locationProvider, $routeProvider) {
// $locationProvider.html5Mode(true);
$routeProvider
.when('/', { templateUrl: 'partials/index', controller: 'ctrl' })
.when('/about', { templateUrl: 'partials/about', controller: 'ctrl' })
.otherwise({redirectTo:'/'});
});
var express = require('express'),
passport = require('passport'),
TwitterStrategy = require('passport-twitter').Strategy,
ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn,
app = express();
app.use(express.static(__dirname + '/public'));
app.use(express.cookieParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
@bb7555
bb7555 / xd.js
Created February 7, 2013 14:37 — forked from amccloud/xd.js
(function() {
'use strict';
var cacheBust = 0,
hashInterval,
lastHash;
this.xd = {
postMessage: function(message, targetOrigin, otherWindow) {
if (!targetOrigin)
@bb7555
bb7555 / xd.js
Created February 7, 2013 14:37 — forked from amccloud/xd.js
(function() {
'use strict';
var cacheBust = 0,
hashInterval,
lastHash;
this.xd = {
postMessage: function(message, targetOrigin, otherWindow) {
if (!targetOrigin)
@bb7555
bb7555 / xd.js
Created February 6, 2013 18:40 — forked from amccloud/xd.js
(function() {
'use strict';
var cacheBust = 0,
hashInterval,
lastHash;
this.xd = {
postMessage: function(message, targetOrigin, otherWindow) {
if (!targetOrigin)
@bb7555
bb7555 / xd.js
Created February 6, 2013 18:40 — forked from amccloud/xd.js
(function() {
'use strict';
var cacheBust = 0,
hashInterval,
lastHash;
this.xd = {
postMessage: function(message, targetOrigin, otherWindow) {
if (!targetOrigin)