Skip to content

Instantly share code, notes, and snippets.

View robwormald's full-sized avatar

Rob Wormald robwormald

View GitHub Profile
@robwormald
robwormald / Timer-without-SCSS.markdown
Created November 12, 2013 02:01
A Pen by Samuil Lembas.
var pocketClock = angular.module('innit.apps.pocketclock.controllers',[])
pocketClock.controller('ClockFlowController',function($scope){
$scope.cards = [
//section 1
[
//card 1-1
{
//state objects
var login = {
name: 'login',
url: '/login',
views: {
'workflow' : {
templateUrl : '/views/login.html',
controller: 'LoginCtrl'
}
var login = {
name: 'login',
url: '/login',
views: {
'workflow' : {
templateUrl : '/views/login.html',
controller: 'LoginCtrl'
}
}
}
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 December 1, 2013 06:03
closed captioning format
{
title : 'my movie',
supportedLanguages : ['en','es'],
data : [
{
timestamp : 0,
en : 'CC provided by rubdubya',
es : 'CC de robdubya'
}
//inside controller
var currentState = 'foo'
$scope.getActiveTab = function(tabName){
if(tabName == currentState){
return true;
}
else{
function dataCtrl($scope, $timeout, Data) {
$scope.data = [];
(function tick() {
$scope.data = MyService.query(function(){
$timeout(tick, 1000);
});
})();
};
/**
* 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 December 6, 2013 02:23
Sails + passport + oauth2orize stuffs
/**
* AuthController
*
* @module :: Controller
* @description :: Contains logic for handling auth requests.
*/
var passport = require('passport');
var GoogleStrategy = require('passport-google').Strategy;