save_and_open_page
have_button(locator)
class Hash | |
def to_html | |
[ | |
'<ul>', | |
map { |k, v| ["<li><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></li>"] }, | |
'</ul>' | |
].join | |
end | |
end |
#!/bin/bash | |
# Bash shell script for generating self-signed certs. Run this in a folder, as it | |
# generates a few files. Large portions of this script were taken from the | |
# following artcile: | |
# | |
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html | |
# | |
# Additional alterations by: Brad Landers | |
# Date: 2012-01-27 |
describe "Shopping Cart Requests" do | |
let!(:user) { Fabricate(:user) } | |
before(:each) do | |
login_user_post("admin", "admin") | |
end | |
context "when I visit the shopping cart" do | |
it " show the logged in users' cart items " do | |
#Test stuff |
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf |
#!/bin/bash | |
# | |
# A simple script to kill all connections to | |
# a postgresql database. | |
# | |
function usage() { | |
cat << EOF | |
usage: $0 options |
#!/usr/bin/env ruby | |
# | |
# git fuzzy-checkout | |
# Same as `git checkout branch`, but with fuzzy matching if checkout fails. | |
# Turns `git checkout barnch` into `git checkout branch`, | |
# assuming `branch` is a branch. | |
# to use, you can alias: | |
# alias co="git fuzzy-checkout" | |
# co msater |
#!/usr/bin/env ruby | |
# | |
# Usage: | |
# irbify.rb script.rb | heroku run rails console --app=my-app | |
# | |
# Why eval and not piping directly? Piping directly would run all lines even if previous line was an invalid statement. | |
# | |
script_name = ARGV[0] |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\