Skip to content

Instantly share code, notes, and snippets.

Avatar

Rob Wormald robwormald

View GitHub Profile
View Timer-without-SCSS.markdown
View controller
var pocketClock = angular.module('innit.apps.pocketclock.controllers',[])
pocketClock.controller('ClockFlowController',function($scope){
$scope.cards = [
//section 1
[
//card 1-1
{
View gist:7702862
//state objects
var login = {
name: 'login',
url: '/login',
views: {
'workflow' : {
templateUrl : '/views/login.html',
controller: 'LoginCtrl'
}
View gist:7715730
var login = {
name: 'login',
url: '/login',
views: {
'workflow' : {
templateUrl : '/views/login.html',
controller: 'LoginCtrl'
}
}
}
View parentViewCtrl.coffee
class ParentViewCtrl
@$inject: ['$scope', '$location']
constructor: (@scope, @location) ->
@scope.fun_times = @fun_times
@scope.some_ojects = @some_objects
fun_times: =>
console.log "something something"
some_objects: [
@robwormald
robwormald / gist:7729105
Created Dec 1, 2013
closed captioning format
View gist:7729105
{
title : 'my movie',
supportedLanguages : ['en','es'],
data : [
{
timestamp : 0,
en : 'CC provided by rubdubya',
es : 'CC de robdubya'
}
View gist:7747149
//inside controller
var currentState = 'foo'
$scope.getActiveTab = function(tabName){
if(tabName == currentState){
return true;
}
else{
View gist:7781217
function dataCtrl($scope, $timeout, Data) {
$scope.data = [];
(function tick() {
$scope.data = MyService.query(function(){
$timeout(tick, 1000);
});
})();
};
View passport.js
/**
* AuthController
*
* @module :: Controller
* @description :: Contains logic for handling auth requests.
*/
var passport = require('passport');
var GoogleStrategy = require('passport-google').Strategy;
@robwormald
robwormald / AuthController.js
Created Dec 6, 2013
Sails + passport + oauth2orize stuffs
View AuthController.js
/**
* AuthController
*
* @module :: Controller
* @description :: Contains logic for handling auth requests.
*/
var passport = require('passport');
var GoogleStrategy = require('passport-google').Strategy;