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
github status message, going oldschool. releasing mad libraries. yall cant stop me. |
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 session = require("session"); | |
//debug.log(session); | |
var fingerPrint = { | |
ip:"123", | |
user_agent:"123", | |
timestamp:"123" | |
}; | |
debug.log(fingerPrint); | |
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
http.createServer(function (req, resp) { | |
setTimeout(function () { | |
multipart.parse(req).addCallback(function(parts) { | |
debug.log('multipart'); | |
}); | |
application.totalRequests++; | |
application.openRequests++; | |
application.currentTime = new Date(); | |
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 api = new DropioApiClient("[YOUR API KEY]"); | |
api.getDrop({drop_name:"somedrop",token:"p@ssw0rd"},receive_response); | |
function receive_response(response,success) { | |
if( success ) | |
for(i in response) | |
alert(i + ": " + response[i]); | |
else | |
alert("Error getting drop: " + response.message); | |
}; |
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
drip.toolbar.HTML = '<div id = "{{id}}" class = "{{class}}"></div>'; | |
drip.toolbar.rendered = Mustache.to_html(drip.toolbar.HTML,{ | |
id:"drip-toolbar", | |
class:"drip-toolbar", | |
}); | |
drip.toolbar.css = { | |
height:"100px", | |
width:"100px", |
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
/* helper method for parsing dynamic CSS, waiting for jquery.require() >.< */ | |
function parseCSS(id,css){ | |
for(style in css){ | |
if(typeof css[style] == 'object'){parseCSS(style,css[style]); | |
else{$(id).css(style,css[style]);} | |
} | |
}; |
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
/* | |
Mustache templating library made available for the CommonJS environment using the | |
modules definition available at: http://wiki.commonjs.org/wiki/Modules/1.1 | |
Shameless port of a shameless port | |
@defunkt => @janl => @aq => @voodootikigod | |
See http://github.com/janl/mustache.js for more info about Mustache itself. | |
*/ |
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 rsp = {}; | |
rsp.message = "hi"; | |
rsp.nickname = "guest"; | |
var chatMessage = '<div class = "drip-chat-message"><span>{{nickname}}: </span><span>{{message}}</span></div>'; | |
chatMessage = Mustache.to_html(chatMessage, { | |
message:rsp.message, | |
nickname:rsp.nickname | |
}); |
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
// helper function for lazy initing objects | |
function jset( o,d ){ | |
if(typeof eval(o) == 'undefined'){ eval( o + ' = ' + d + ';' ); } | |
return true; | |
} | |
// jset() usage | |
jset ( 'drip' , '{}' ); | |
jset ( 'drip.value' , 42 ); | |
jset ( 'drip.URI' , 'google.com' ); |
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 posix = require('posix'), debug = require("./node_debug/debug"), sys = require('sys'); | |
var application = {}; | |
application.dataPath = '/var/www/node.js/internetfactsite.com/data/drip.json'; | |
application.data = {}; | |
/* | |
*/ | |
// helper function for lazy initing objects | |
function jset( o,d,t ){ | |
if(typeof eval(o) == 'undefined'){ eval( o + ' = ' + d + ';' ); } |
OlderNewer