Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am PastorBones on github.
  • I am pastorbones (https://keybase.io/pastorbones) on keybase.
  • I have a public key whose fingerprint is 071D 43C2 6980 2CAF FB9D 70F8 33E0 3385 F9D4 0E46

To claim this, I am signing this object:

$(function(){
var filename = 'myfile.txt';
now.ready(function(){
now.readFile(filename);
})
})
@PastorBones
PastorBones / Page.js
Created January 11, 2012 06:27
NodeJS & Express easy page builder
var Page = function(opt){
var self = this
self.global = {
styles: []
, scripts: []
, keywords: []
}
@PastorBones
PastorBones / app.js
Created November 18, 2011 08:11
Add stylesheets to Express layout dynamically
var express = require('express')
, app = express.createServer()
// Function to push formatted style
// paths onto our stylesheet variable
var addStyles = function(res, styles) {
styles.forEach(function(style){
res.app.settings['view options'].styles.push('/stylesheets/' + style + '.css')
})
return true