Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| # Sample implementation of quicksort and mergesort in ruby | |
| # Both algorithm sort in O(n * lg(n)) time | |
| # Quicksort works inplace, where mergesort works in a new array | |
| def quicksort(array, from=0, to=nil) | |
| if to == nil | |
| # Sort the whole array, by default | |
| to = array.count - 1 | |
| end |
| #!/usr/bin/env bash | |
| curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
| mkdir vim && tar xzvf vim.tar.gz -C vim | |
| export PATH=$PATH:/app/vim/bin |
I'm a fan of MiniTest::Spec. It strikes a nice balance between the simplicity of TestUnit and the readable syntax of RSpec. When I first switched from RSpec to MiniTest::Spec, one thing I was worried I would miss was the ability to add matchers. (A note in terminology: "matchers" in MiniTest::Spec refer to something completely different than "matchers" in RSpec. I won't get into it, but from now on, let's use the proper term: "expectations").
Let's take a look in the code (I'm specifically referring to the gem, not the standard library that's built into Ruby 1.9):
# minitest/spec.rb
module MiniTest::Expectations| license: gpl-3.0 |