- Setup a new Rails app
- Initialize a local repository using git
- Create a new remote repository using GitHub
- Change README.rdoc
- Deploy to a cloud service - Heroku
- Ruby is installed (v 1.9.3)
- Rails is installed (v 3.2.3)
| var above = function(limit){ | |
| return function(value){ | |
| return value > limit; | |
| }; | |
| }; | |
| var isAbove10 = above(10); | |
| console.log(isAbove10(5)); // false | |
| console.log(isAbove10(8)); // false |
| /** | |
| * Return a timestamp with the format "m/d/yy h:MM:ss TT" | |
| * @type {Date} | |
| */ | |
| function timeStamp() { | |
| // Create a date object with the current time | |
| var now = new Date(); | |
| // Create an array with the current month, day and time |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
| function uuid() { | |
| var uuid = "", i, random; | |
| for (i = 0; i < 32; i++) { | |
| random = Math.random() * 16 | 0; | |
| if (i == 8 || i == 12 || i == 16 || i == 20) { | |
| uuid += "-" | |
| } | |
| uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); | |
| } |