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
+--[ RSA 2048]----+ | |
| | | |
| | | |
|E | | |
|. | | |
|. S | | |
| . o. . | | |
|. +o.+. . | | |
| =+++.+. | | |
|+o+++=o=o | |
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 print_to = (function(to) { | |
var n = 1, print_n = (function() { | |
if (n>to) { print_n = false; return; } | |
console.log(n++); | |
print_n(); | |
}); | |
print_n(); | |
}); | |
var print_too = (function(to) { |
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
/** | |
* Main server script for Discord mudlib. Most of the code is still messy from | |
* Node Knockout. | |
* | |
* This file is in charge of all the nitty gritty bits of loading all the | |
* JavaScript files required to get a World instance running, then opening a | |
* socket and redirecting input to a Player object within the world. | |
* | |
* Most of the file loading logistics lives in the World class, which handles | |
* determining where to pull files from based on configuration options and |
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() { //Only Discord will end up in the global namespace. | |
Discord = new Class({ | |
Implements: [Events, Options], | |
connection: false, | |
commandHistory: [], | |
commandIndex: 0, | |
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
/** | |
* INSTALLATION: | |
* | |
* All these modules are core modules except for redis. To install that, just | |
* type 'npm install redis'. | |
* | |
* To run, 'node app.js <port number>'. | |
* | |
* USAGE: | |
* |
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
//Foo is in the global namespace. Let's see which closure contents overwrite it. | |
foo = function() { console.log("FOO"); }; | |
// Defining a named function will never overwrite the global namespace. | |
(function() { | |
function foo() { console.log("OH NOES"); } | |
})(); | |
foo(); //FOO |
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
Eve.scope('.hello-world', function() { | |
this.listen('div.line', 'click', function(e) { | |
console.log("You clicked on .hello-world div.line"); | |
}); | |
}); |
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
Eve.scope('.hello-world', function() { | |
this.listen('div.line', 'click', function(e) { | |
console.log("You clicked on .hello-world div.line"); | |
}); | |
}); |
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
Eve.scope('.hello-world', function() { | |
this.listen('div.line', 'click', function(e) { | |
console.log("You clicked on .hello-world div.line"); | |
}); | |
}); |
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
Eve.register('myAwesomePlugin', function() { | |
this.listen('a', 'click', function() { | |
console.log("You clicked on a link within my namespace!"); | |
}); | |
//Since no namespace is provided, this event will be triggered by | |
//any click events within the scoped namespace. | |
this.listen('click', function() { | |
alert("You clicked somewhere within my namespace!"); |