Skip to content

Instantly share code, notes, and snippets.

View doodlehaus's full-sized avatar

Mark Anderson doodlehaus

View GitHub Profile
@doodlehaus
doodlehaus / Bike Counts
Last active April 16, 2021 16:22
Sorting Bikes with Linq
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace popular_bikes
{
class Program
{
static void Main(string[] args)

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

# string substitution
puts "We'd have %s beans, %s jars, and %s crates." % [jelly_beans, jars, crates]
# define a specific string
my_string = "I'm a string!"
# call #reverse
# 1) this first checks to see if my_string has a method called reverse
# 2) it doesn't find one
# 3) it then checks for reverse on my_string's parent class, which is String
# 4) it finds the method and executes it and outputs the following:
my_string.reverse
=> "!gnirts a m'I"
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@doodlehaus
doodlehaus / 0_README.md
Created September 20, 2012 17:54 — forked from netzpirat/0_README.md
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@doodlehaus
doodlehaus / lrthw_string_interpolation.rb
Created August 31, 2012 02:11
Ruby string interpolation that's new to me
puts "We'd have %s beans, %s jars, and %s crates." % [jelly_beans, jars, crates]
@doodlehaus
doodlehaus / about.md
Created August 13, 2011 00:45 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer