This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
var moment = require('moment'); | |
var today = moment().startOf('day'); | |
console.log("today ", moment().startOf('day')); | |
console.log("tomorrow ", moment(today).add(1, 'days')); | |
var day = moment().unix() * 1000; | |
var dayInISO = moment().millisecond(moment().unix()); | |
console.log(dayInISO.format()); | |
console.log("Today in ISO ", moment().format()); | |
console.log("Today ", moment()); |
// To disable socket.io, disable the sockets hook (you'll have to disable the pubsub hook as well) | |
// This is a replacement for the default app.js file: | |
require('sails').lift({ | |
hooks: { | |
sockets: false, | |
pubsub: false | |
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
<!-- when.js Promises implementation --> | |
<script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
<!-- Unit testing and mocking framework --> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
# The official wiki page for Building and Installing Node.js | |
# https://github.com/joyent/node/wiki/Installation | |
# Update the system | |
echo 'Update the system' | |
sudo apt-get -y udpate | |
echo 'System updated' | |
# Install the dependencies packages | |
echo 'Install the dependencies packages' |
$ git tag -a v1.0.0 -m "Creating the first official version." | |
$ git show v1.0.0 | |
$ git describe --tags | |
# Made changes | |
$ touch test | |
# Added changes |
<form name="${name}" id="${id}" method="post" action="${action}" > | |
${cursor} | |
</form> |
<form name="${name}" id="${id}" method="get" action="${action}" > | |
${cursor} | |
</form> |