Skip to content

Instantly share code, notes, and snippets.

@brikis98
Created January 16, 2012 23:14
Show Gist options
  • Select an option

  • Save brikis98/1623528 to your computer and use it in GitHub Desktop.

Select an option

Save brikis98/1623528 to your computer and use it in GitHub Desktop.
Sample code for developer happiness blog post
var app = express.createServer();
app.get('/', function(req, res){
res.send('Hello World');
});
app.listen(3000);
a, b, c, d = 1, 2, 3, 4
case year
when 1970..1979: "Seventies"
when 1980..1989: "Eighties"
when 1990..1999: "Nineties"
end
today = Time.now
yesterday = today.yesterday
puts "Hello World!"
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8124);
console.log('Server running at http://127.0.0.1:8124/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment