Skip to content

Instantly share code, notes, and snippets.

View hyeomans's full-sized avatar
🏠
Working from home

Hector Yeomans hyeomans

🏠
Working from home
View GitHub Profile
@hyeomans
hyeomans / gist:5327710
Last active December 15, 2015 21:39 — forked from alexbihary/gist:5078409
Setting up an environment in Debian based

Ubuntu 12.04 Ruby on Rails Development Environment

I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.

As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.

Step 1: Get the repos ready and run updates.

sudo apt-get update && sudo apt-get upgrade

Install Rails

gem install rails

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@hyeomans
hyeomans / gist:4270322
Created December 12, 2012 18:32
Testing environment for Rails
1.- Start Spork in a terminal window.
2.- Write a single test or small group of tests.
3.- Run Command-Shift-R to verify that the test or test group is red.
4.- Write the corresponding application code.
5.- Run Command-Shift-E to run the same test/group again, verifying that it’s green.
6.- Repeat steps 2–5 as necessary.
7.- When reaching a natural stopping point (such as before a commit), run rspec spec/ at the command line to confirm that the entire test suite is still green.
@hyeomans
hyeomans / gist:2494406
Created April 25, 2012 23:23
Installing Riak in Mint
Installing Erlang
sudo apt-get install curl build-essential libncurses5-dev openssl libssl-dev fop xsltproc
curl -O https://raw.github.com/spawngrid/kerl/master/kerl
chmod a+x kerl
./kerl build R14B03 r14b03
sudo ./kerl install r14b03 /opt/erlang/r14b03
. /opt/erlang/r14b03/activate
Installing Riak
sudo apt-get install build-essential libc6-dev-i386
@hyeomans
hyeomans / strategy.cs
Created March 21, 2012 18:23
Strategy Pattern with BitRate Conversions
using System;
using System.Collections.Generic;
namespace StrategyPattern
{
public enum UnitOfBitRate
{
Gbps,
Mbps,
Kbps,