Skip to content

Instantly share code, notes, and snippets.

View rcorreia's full-sized avatar

Ryan Thomas Correia Ortega rcorreia

View GitHub Profile
=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')

First install Virtualbox

  1. sudo pico /etc/apt/sources.list.d/virtualbox.list
  2. Add deb http://download.virtualbox.org/virtualbox/debian saucy contrib non-free
  3. wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
  4. sudo apt-get update
  5. sudo apt-get install dkms unzip
  6. sudo apt-get install virtualbox-4.3 --no-install-recommends
  7. wget http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
  8. sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.6.vbox-extpack
@rcorreia
rcorreia / config.php
Last active August 29, 2015 14:07 — forked from gpkvt/config.php
<?php
class phpVBoxConfig {
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'CHANGE_ME';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://localhost:18083/';
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com
@rcorreia
rcorreia / parallel_ci_reporter.rb
Created April 16, 2012 20:50
Using ci_reporter with parallel_tests
# The way the parallel_tests gem loads the test suite is incompatible with how ci_reporter loads the
# test suite. This module reconciles the difference by recognizing when ci_reporter is expected to
# be loaded and then doing it.
module ParallelCIReporter
# Sets up ci_reporter if necessary.
def self.setup_ci_reporter
install_mediator if ci_reporter?
end
@rcorreia
rcorreia / gist:3632616
Created September 5, 2012 07:28 — forked from ryanlecompte/gist:3631742
My solution to New Relic's programming challenge
# I had a lot of fun doing this one! The following code makes
# the tests at https://gist.github.com/6ea0a0ba5702824075ab pass.
#
# NOTE: I normally would DRY some of this code up, but it's just a
# fun challenge and would never be deployed to production. :)
module MethodInstrumenter
def self.instrument_path(path)
@path = path
@instrumenting = false
@rcorreia
rcorreia / dbranch.sh
Created September 14, 2012 22:57 — forked from pierrel/dbranch.sh
Delete all merged branches
#!/bin/bash
# Deletes all branches already merged with master
git checkout master
git pull
for BRANCH in `git branch`; do
git branch -d ${BRANCH}
done
@rcorreia
rcorreia / dbranch.sh
Created November 19, 2012 17:18 — forked from pierrel/dbranch.sh
Delete all merged branches
#!/bin/bash
# Deletes all branches already merged with master
git checkout master
git pull
for BRANCH in `git branch`; do
git branch -d ${BRANCH}
done
@rcorreia
rcorreia / Procfile
Created November 20, 2012 14:13 — forked from dvdsgl/Procfile
Automated Jenkins Comments on GitHub Pull Requests
web: node server.js
from threading import Thread
from selenium import selenium
import time
try:
import json
except ImportError:
import simplejson as json
USERNAME = "USERNAME"
ACCESS_KEY = "ACCESS-KEY"