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
/*jslint node: true, maxlen: 80, indent: 4 */ | |
"use strict"; | |
var paco = "paco"; | |
function fun1(paco) { | |
console.log(paco); | |
} | |
function fun2() { |
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
find . -type f \( -name '*.css' -or -name '*.js' -or -name '*.html' \) | xargs wc -l |
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
"use strict"; | |
var math = exports; | |
/** | |
* Adds a new value to a calculated average. | |
* | |
* i.e. n × average + value | |
* ------------------- = new average | |
* n + 1 |
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
/*jslint node: true */ | |
"use strict"; | |
var express = require("express"), | |
consolidate = require("consolidate"), | |
Handlebars = require("handlebars"), | |
fs = require("fs"); | |
var app = express(); |
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
server.use((function () { | |
var | |
/** | |
* Checks if a request parameter has been defined. | |
*/ | |
contains = function (parameter) { | |
return this.params[parameter] !== undefined; | |
}, | |
/** |
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 crypto = require("crypto"); // native module that allows ciphering | |
var CIPHER_KEY = "test-key", CIPHER_ALGORITHM = "aes256"; | |
// Original message | |
var message = "This message will be ciphered"; | |
console.log("Original message -> " + message); | |
// Cipher message | |
var cipher = crypto.createCipher(CIPHER_ALGORITHM, CIPHER_KEY); |