This file contains 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 mode = process.argv[2] ? process.argv[2] : "local"; | |
mode = mode.replace("/", "") == "tests" ? "local" : mode; | |
var express = require('express'); | |
var app = express(); | |
var config = require("./config/" + mode).config; | |
var glob = require("glob"); | |
var path = require('path'); | |
// helper middlewares |
This file contains 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 GitHub = (function() { | |
var feed = function(user, callback) { | |
var url = "https://api.github.com/users/" + user + "/events"; | |
$.ajax({ | |
url: url, | |
dataType: 'jsonp', | |
success: function(results) { | |
callback(null, results); | |
}, |
This file contains 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
<?php | |
class FacebookFeed { | |
private $appID; | |
private $appSecret; | |
private $fbID; | |
private $appToken; | |
public function __construct($appID, $appSecret, $fbID, $appToken = false) { |
This file contains 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 Twitter = (function() { | |
var feed = function(userId, callback, count) { | |
var url = "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=" + userId + "&count=" + (count || 10); | |
$.ajax({ | |
url: url, | |
dataType: 'jsonp', | |
success: function(results) { | |
callback(null, results); | |
}, |
This file contains 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 element = { | |
el: $("<div></div>"), | |
appended: [], | |
listeners: {}, | |
init: function() { | |
return this; | |
}, | |
onAppend: function() { | |
return this; | |
}, |
This file contains 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
@keyframes blink { | |
0% { opacity: 1; } | |
12% { opacity: 0.75; } | |
24% { opacity: 0.5; } | |
36% { opacity: 0.25; } | |
48% { opacity: 0; } | |
60% { opacity: 0.25; } | |
72% { opacity: 0.5; } | |
84% { opacity: 0.75; } | |
100% { opacity: 1; } |
This file contains 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 console = {log: function(o) { $.writeln(o); }} | |
var Action = { | |
applyAction: function(o, layerKind, callback) { | |
if(o.typename == "LayerSet") { | |
var layers = o.layers; | |
for(var i=0; i<layers.length; i++) { | |
this.applyAction(layers[i], layerKind, callback) | |
} | |
} else { |
This file contains 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 Dispatcher = function(componentName) { | |
var listeners = []; | |
return { | |
on: function(eventName, callback) { | |
if(!listeners[eventName]) { | |
listeners[eventName] = []; | |
} | |
listeners[eventName].push(callback); | |
return this; | |
}, |
This file contains 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 filterTextArea = function(text) { | |
text = text.replace(/(<([^>]+)>)/ig, ''); | |
var re = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?([\w\-]{10,12})(?:&feature)?(?:[\w\-]{0})?/g; | |
var iframe = '<iframe width="640" height="360" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'; | |
text = iframe.replace('$1', text.split(re)[1]); | |
return text; | |
}; |
OlderNewer