This file contains hidden or 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
#!/bin/bash | |
USER='lrvick' | |
ACCESS_TOKEN='YOUR_TOKEN_HERE' | |
API="https://api.github.com/orgs" | |
ENDPOINT="/${USER}/repos?per_page=200&access_token=${ACCESS_TOKEN}" | |
FOLDER='/home/lrvick/Sources' | |
REPO_NAMES=$( curl -s "${API}${ENDPOINT}" | \ | |
grep \"name\" | sed 's/ \"name\": \"\(.*\)\",/\1/g' |
This file contains hidden or 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 assert = require("assert") | |
var pigLatinTrans = function(text){ | |
var pigText = text.replace(/[A-Za-z]+/gi,function(word){ | |
var letters = word.split('') | |
var firstLetter = letters.shift() | |
if (firstLetter.toUpperCase() == firstLetter){ | |
letters.push(firstLetter.toLowerCase()) | |
letters[0] = letters[0].toUpperCase() | |
letters.push(firstLetter) |
This file contains hidden or 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
// MIT: http://opensource.org/licenses/MIT | |
angular.module('app', []); | |
angular.module('app').controller | |
( 'MainCtrl' | |
, function($scope,$locale) { | |
$scope.currentYear = new Date().getFullYear() | |
$scope.currentMonth = new Date().getMonth() + 1 | |
$scope.months = $locale.DATETIME_FORMATS.MONTH |
This file contains hidden or 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
//TODO: make this a module | |
/** | |
* # SockJS socket management service | |
* | |
* Creates SockJS socket connection to server, re-connects on disconnection, | |
* and exports hooks to map handlers for various data interactions. | |
* | |
*/ | |
angular.module('app').factory |
This file contains hidden or 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
function jsSort(items){ | |
var steps = 0 | |
items.sort(function(a,b){ | |
steps = steps+1 | |
return a-b | |
}) | |
return [items,steps] | |
} | |
This file contains hidden or 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
/** | |
* # Global logging module | |
* | |
* This is a global set of hooks that catch all $log messages sent out by the | |
* application. Currently they are simply passed off directly to console.log | |
* but this could be updated later to allow them to be stored locally, sent to | |
* a server etc. | |
*/ | |
angular.module('ngLogging', []) |
This file contains hidden or 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
{ | |
"directory": "app/lib" | |
} |
This file contains hidden or 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
/** | |
* ## Fetch Data | |
* | |
* @param {String} key Data source to request | |
* @param {Boolean} use_storage set/get from localStorage | |
* @param {Object} request JSON formatted request for server | |
* | |
* @return {Object} a $q.defer().promise for the data requested | |
* | |
*/ |
This file contains hidden or 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
app.controller( 'AppCtrl', function ($scope, socket) { | |
socket.onopen( | |
function(){ | |
console.log('Socket is connected :D') | |
} | |
) | |
socket.onclose( | |
function(){ | |
console.log('Socket is disconnected :(') | |
} |
This file contains hidden or 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
async.waterfall [ | |
(cb) -> | |
if user?.id | |
models.execute User, 'find', user.id, (err,user) -> | |
cb null, err, userModel | |
else | |
cb null, null, null | |
(err, userModel, cb) -> |