Skip to content

Instantly share code, notes, and snippets.

View dpritchett's full-sized avatar
🦅
microservice party

Daniel Pritchett ⚡ dpritchett

🦅
microservice party
View GitHub Profile
// Original author unknown, copied from a reddit comment and used regularly
javascript:var el=$(".bylink");var ei=0;(function fe(){while(ei<el.length){var s=el[ei].innerHTML;var parent=s.indexOf("parent");if(parent==0){hidecomment(el[ei]);}ei++;}})()
# Contributed by Jason Huggins
sys = require 'sys'
http = require 'http'
server = http.createServer (req, res) ->
res.writeHead 200, 'Content-Type': 'text/plain'
res.write 'Hello, World!'
res.end()
#!/bin/bash
#patch ubuntu
sudo apt-get update -y
sudo apt-get install -y build-essential git-core --fix-missing
#install node.js
wget http://nodejs.org/dist/node-v0.2.2.tar.gz
gunzip node-v0.2.2.tar.gz | tar -xvf
tar -xvf node-v0.2.2.tar
cd node-v0.2.2
#var app = require('express').createServer();
#var md = require('node-markdown').Markdown;
#app.get('/', function(req, res){
# res.send(md('Hello, *world*! The time is' +
# '\n\n**' + (new Date()) + '**'));});
#app.listen(3000);
#console.log('Now listening on port 3000');
//Working JS
var server = Connect.createServer(
Connect.logger(),
Connect.staticProvider(__dirname + '/public'),
function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('Hello World');
res.end();
}
db.saveDoc(uuid.generate(), message, (er, ok) ->
if er
console.log 'DB error on input: ' +
$(message) +
$(er)
throw new Error $(er)
else
client.broadcast $(message)
console.log 'Wrote to couch: ' +
sys.inspect message
client.send (() ->
response.content = "Welcome to chatbox! Other users online: " + users.list()
return $(response)
)()
@sendNameChange($('#username').attr 'value' ) unless
$("#username").css('display') is 'none' and
$("#username").attr("value").search("user") is -1
Total 13 (delta 3), reused 0 (delta 0)
remote: Starting node v0.2.2...
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:49 GMT] "GET /phpMyAdmin-2.8.0-rc1/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:49 GMT] "GET /phpMyAdmin-2.8.0-rc2/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:49 GMT] "GET /phpMyAdmin-2.8.0/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:49 GMT] "GET /phpMyAdmin-2.8.0.1/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:50 GMT] "GET /phpMyAdmin-2.8.0.2/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:50 GMT] "GET /phpMyAdmin-2.8.0.3/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:50 GMT] "GET /phpMyAdmin-2.8.0.4/scripts/setup.php HTTP/1.1" 200 - "" "ZmEu"
remote: 83.133.119.239 - - [Tue, 12 Oct 2010 05:09:50 G
#!/usr/bin/env ruby
cmds = []
cmds << "git co gh-pages"
cmds << "git merge master"
cmds << "git push origin gh-pages"
cmds << "git co master"
cmds << "git push origin master"
cmds << "git push joyent master"