Skip to content

Instantly share code, notes, and snippets.

@focused
focused / feature_macros.rb
Last active Jan 3, 2016
Tuning capybara + capybara-webkit + database_cleaner + DeferredGarbageCollection + feature macros
View feature_macros.rb
# spec/support/feature_macros.rb
module FeatureMacros
extend ActiveSupport::Concern
# get current domain ("lvh.me:12345")
def domain(port = Capybara.current_session.server.try(:port) || 3000)
port &&= ":#{ port }"
"#{ DEFAULT_HOST }#{ port }"
end
@cander
cander / basic.sh
Created May 25, 2012
Bourne Basic - a BASIC interpreter implemented (painfully) in pure Bourne shell
View basic.sh
#!/bin/sh
#
#
# From: allbery@ncoast.UUCP (allbery@ncoast.UUCP)
# Subject: bournebasic
# Newsgroups: comp.sources.misc
# Date: 1987-08-18 18:54:12 PST
#
# Here's a useful BASIC interpreter written in Bourne shell.
# There's no manual but this demo shows the most salient features:
@shazron
shazron / sim-run.sh
Created Oct 25, 2011
Run Xcode Simulator project from the command line
View sim-run.sh
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1