Skip to content

Instantly share code, notes, and snippets.

View scottharvey's full-sized avatar

Scott Harvey scottharvey

View GitHub Profile
<div id="#rooms">
<div id="room_1">Room 1</div>
<div id="room_2">Room 2</div>
</div>
Room.prototype.roomText = function() {
return this.element.find("p").text();
};
Room.count = function() {
return $(".room").length;
}
// public properties
this.element = $("#" + elementId);
this.tooltip = this.element.find(".tooltip");
// Any function calls in here will be executed when a room object is instantiated
this.initalizeTooltip();
function Room(elementId) {
var Room = function (elementId) {
Var Room = function (elementId) {
// public properties
this.element = $("#" + elementId);
this.tooltip = this.element.find(".tooltip");
// Any function calls in here will be executed when a room object is instantiated
this.initalizeTooltip();
}
// Here we are defining a class method that can be called like this: Room.count();
git clone http://github.com/ry/node.git
cd node
./configure
make
sudo make install
var fs = require('fs');
fs.readFile('./readme.txt', function (err, data) {
if (err) throw err;
console.log(data);
});
if [[ -n "$rvm_environments_path" && -s "$rvm_environments_path/ruby-1.8.7-p302@bugmasher" ]] ; then
. "$rvm_environments_path/ruby-1.8.7-p302@bugmasher"
else
rvm --create use "ruby-1.8.7-p302@bugmasher"
fi