- You have no rights
- Please read carefully 1
Last updated November 1st, 2012.
/* | |
█░░░░░█░░░░░░░░░░░░░░░░░░░░░█░░█░░░░░░░░░░░░░░█▀▀█ | |
█░█▀█░█░░█░█░░█▀█▀█░█▀▀█░█▀▀█░░█▀▀█░█▀▀░█▀▀▀█░░░░█ | |
█░█░█░█░░█░█░░█░█░█░█▀▀█░█░░█░░█░░█░█░░░█░░░█░░▀▀▀ | |
▀░▀▀▀░▀░░▀▀▀░░▀░░░▀░▀░░▀░▀▀▀▀░░▀▀▀▀░▀░░░▀▀▀▀▀░░█░░ | |
*/ |
/* | |
* node-ws - pure Javascript WebSockets server | |
* Copyright Bradley Wright <[email protected]> | |
*/ | |
// Use strict compilation rules - we're not animals | |
'use strict'; | |
var net = require('net'), | |
crypto = require('crypto'); |
//creating an element is easy peasy | |
var divElem = document.createElement( 'div' ); | |
//divElem is now a div element. it's not related to the any other element or | |
// node, it's free-range. | |
//to add it to the body element, for example: | |
document.body.appendChild( divElem ); | |
//splendidsimo! |
1. Zirak likes babies. |
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach; | |
NodeList.prototype.map = HTMLCollection.prototype.map = Array.prototype.map; | |
NodeList.prototype.filter = HTMLCollection.prototype.filter = Array.prototype.filter; | |
NodeList.prototype.reduce = HTMLCollection.prototype.reduce = Array.prototype.reduce; | |
NodeList.prototype.every = HTMLCollection.prototype.every = Array.prototype.every; | |
NodeList.prototype.some = HTMLCollection.prototype.some = Array.prototype.some; | |
var By = { | |
id: function (id) { return document.getElementById(id) }, | |
tag: function (tag, context) { | |
return (context || document).getElementsByTagName(tag) |
function createWebSocket () { | |
var connection = new WebSocket(); | |
var attempts = 1; | |
connection.onopen = function () { | |
// reset the tries back to 1 since we have a new connection opened. | |
attempts = 1; | |
// ...Your app's logic... | |
} |
Sid Meier's 10 Rules of Game Design | |
1. Choose a topic you have a passion for. Game Design is about creativity. | |
2. Do research after the game is done. Tap into the player’s brain. | |
3. Define your axioms, refine your axioms. Prototype, prototype, prototype; sit in all the chairs. | |
4. Double it or cut it in half. You are more wrong than you think. |
var inputbox = $('#bufferInputView' + cb().bid()); | |
var msg = inputbox.val(); | |
inputbox.val(""); | |
var cc = "\u0003"; | |
var bold = "\u0002"; | |
var reset = "\u000f"; | |
var italic = "\u0016"; | |
var underline = "\u001f"; | |
cb().say(msg.replace(/&b/g,bold).replace(/&r/g,reset).replace(/&i/g,italic).replace(/&u/g,underline).replace(/&/g,cc)); |