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
| Last login: Thu Aug 5 12:50:55 on ttys001 | |
| gem ~/: gem install rails --prerelease | |
| Successfully installed activesupport-3.0.0.rc | |
| Successfully installed activemodel-3.0.0.rc | |
| Successfully installed rack-mount-0.6.9 | |
| Successfully installed tzinfo-0.3.22 | |
| Successfully installed abstract-1.0.0 | |
| Successfully installed erubis-2.6.6 | |
| Successfully installed actionpack-3.0.0.rc | |
| Successfully installed arel-0.4.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
| var db = require("db-orm"); | |
| // Import the Email type from the context of the database. | |
| var Email = db.types("Email"); | |
| // setup our database: | |
| db.configure({ | |
| type: "redis", | |
| host: "127.0.0.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
| // my little html string builder | |
| buildHTML = function(tag, html, attrs) { | |
| // you can skip html param | |
| var h = document.createElement(tag); | |
| var attrs = attrs || {}; | |
| if (arguments.length == 2 && !((html) instanceof HTMLElement) && typeof(html) == "object") { | |
| attrs = html; | |
| html = null; | |
| } |
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 child_process = require('child_process'), | |
| sys = require('sys'), | |
| net = require('net'), | |
| netBinding = process.binding('net'); | |
| var fd = netBinding.socket('tcp4'); | |
| netBinding.bind(fd, 8080); | |
| netBinding.listen(fd, 128); | |
| for (var i = 0; i < 4; i++) { |
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 child_process = require('child_process'), | |
| sys = require('sys'), | |
| net = require('net'), | |
| netBinding = process.binding('net'); | |
| var fd = netBinding.socket('tcp4'); | |
| netBinding.bind(fd, 8080); | |
| netBinding.listen(fd, 128); | |
| for (var i = 0; i < 4; i++) { |
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 child_process = require('child_process'), | |
| sys = require('sys'), | |
| net = require('net'), | |
| netBinding = process.binding('net'); | |
| var fd = netBinding.socket('tcp4'); | |
| netBinding.bind(fd, 8080); | |
| netBinding.listen(fd, 128); | |
| for (var i = 0; i < 4; i++) { |
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 child_process = require('child_process'), | |
| sys = require('sys'), | |
| net = require('net'), | |
| netBinding = process.binding('net'); | |
| var fd = netBinding.socket('tcp4'); | |
| netBinding.bind(fd, 8080); | |
| netBinding.listen(fd, 128); | |
| for (var i = 0; i < 4; i++) { |
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 net = require('net'); | |
| var server = net.createServer(function (stream) { | |
| stream.setTimeout(0); | |
| }); | |
| server.listen(7000); |
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 sys = require('sys') | |
| , http = require("http") | |
| , spawn = require('child_process').spawn; | |
| var filename = process.ARGV[2]; | |
| if (!filename){ | |
| sys.puts("Usage: node watcher.js filename"); | |
| process.exit(1); | |
| } else { |
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
| // Copyright 2009 Ryan Dahl <[email protected]> | |
| #include <v8.h> | |
| #include <node.h> | |
| #include <node_os.h> | |
| #include <sys/types.h> | |
| #include <sys/time.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <assert.h> |