Skip to content

Instantly share code, notes, and snippets.

/**
* Attaches the script represented by the URL to the current
* environment. Right now only supports browser loading,
* but can be redefined in other environments to do the right thing.
* @param {String} url the url of the script to attach.
* @param {Object} context the context that wants the script.
* @param {moduleName} the name of the module that is associated with the script.
* @param {Function} [callback] optional callback, defaults to require.onScriptLoad
* @param {String} [type] optional type, defaults to text/javascript
* @param {Function} [fetchOnlyFunction] optional function to indicate the script node
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Test</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Saleem:kfmjs koding$ npm install terminaljs --type tty.js --force
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] package.json: 'contributers' should probably be 'contributors'
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] dependencies field should be hash of <name>:<version-range> pairs
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
# Client-side:
request = new XMLHttpRequest()
request.open('GET', "http://lakjsdflkjasld:[email protected]:1337/#{path}?#{cacheDiffString()}", true)
request.responseType = 'text'
request.onreadystatechange = ->
console.log request.response
request.send()
# Server-side:
(http.createServer (req, res)->
sudo nodeunit main.js
OK: 0 assertions (50ms)
info - socket.io started
testindex.js
debug - served static content /socket.io.js
debug - client authorized
info - handshake authorized 2138408021895215838
debug - setting request GET /socket.io/1/websocket/2138408021895215838
for (id in cluster.workers) {
worker = cluster.workers[id];
worker.process.kill();
}
Saleem-Abdul-Hamids-Computer:Purvue saleemabdulhamid$ rake db:seed
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Host: localhost, Port: 27017
rake aborted!
Failed to connect to a master node at localhost:27017
/Volumes/DataHD/Users/saleemabdulhamid/.rvm/gems/ruby-1.9.3-p362/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:479:in `connect'
/Volumes/DataHD/Users/saleemabdulhamid/.rvm/gems/ruby-1.9.3-p362/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:631:in `setup'
/Volumes/DataHD/Users/saleemabdulhamid/.rvm/gems/ruby-1.9.3-p362/gems/mongo-1.8.1/lib/mongo/mongo_client.rb:147:in `initialize'
/Volumes/DataHD/Users/saleemabdulhamid/.rvm/gems/ruby-1.9.3-p362/gems/mongo-1.8.1/lib/mongo/legacy.rb:56:in `initial
Saleem-Abdul-Hamids-Computer:bin saleemabdulhamid$ ./mongod --dbpath /Volumes/DataHD/data/
Thu Jan 10 14:40:22 [initandlisten] MongoDB starting : pid=66485 port=27017 dbpath=/Volumes/DataHD/data/ 64-bit
Thu Jan 10 14:40:22 [initandlisten] db version v1.8.2, pdfile version 4.5
Thu Jan 10 14:40:22 [initandlisten] git version: 433bbaa14aaba6860da15bd4de8edf600f56501b
Thu Jan 10 14:40:22 [initandlisten] build sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Thu Jan 10 14:40:22 [initandlisten] waiting for connections on port 27017
Thu Jan 10 14:40:22 [websvr] web admin interface listening on port 28017
Thu Jan 10 14:40:33 [initandlisten] connection accepted from 127.0.0.1:63632 #1
Thu Jan 10 14:40:33 [conn1] end connection 127.0.0.1:63632
Saleem-Abdul-Hamids-Computer:Purvue saleemabdulhamid$ rake db:seed
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Host: localhost, Port: 27017
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Host: localhost, Port: 27017
We're about to import our data
****************************************************************************************************
*******************************
Saleem-Abdul-Hamids-Computer:Purvue saleemabdulhamid$ rake NO_EXTRACTS=true db:seed
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Environment: {"sessions"=>{"default"=>{"database"=>"saddle", "hosts"=>["localhost:27017"], "options"=>nil}}, "options"=>{"identity_map_enabled"=>true, "raise_not_found_error"=>false}}
Host: localhost, Port: 27017
We're about to import our data
****************************************************************************************************
****************************************************************************************************
****************************************************************************************************
Creating Database Indices
rake db:mongoid:create_indexes