Skip to content

Instantly share code, notes, and snippets.

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')
@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@shazron
shazron / sim-run.sh
Created October 25, 2011 21:53
Run Xcode Simulator project from the command line
#!/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
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@bsstoner
bsstoner / http.js
Created May 21, 2012 03:30
support helper for doing http tests with mocha
/**
* Modified version of TJ's http support file from the Express repo:
* https://github.com/visionmedia/express/blob/master/test/support/http.js
*
* Module dependencies.
*/
var EventEmitter = require('events').EventEmitter
, should = require('should')
, methods = ['get','post','put','delete','head']
@passcod
passcod / dom-loaded-test.html
Created May 26, 2012 08:29
onload, readyState, and DOMContentLoaded
<!DOCTYPE html>
<html>
<head>
<script>
window.onload = function () {
console.log(''+(+new Date)+': Onload fired');
};
document.onreadystatechange = function () {
console.log(''+(+new Date)+': Ready state changed');
@torsten
torsten / fix-whitespace.sh
Created September 12, 2012 13:58
Pre-commit hook script for git to fix whitespace and long lines.
#!/bin/sh
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length.
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@toddq
toddq / README.md
Last active October 13, 2022 07:03 — forked from iainjmitchell/README.md

##Description Simple Dashing widget (and associated job) to display RSS feeds. Based on Iaian Mitchell's News widget.

##Screenshot

##Dependencies nokogiri

htmlentities

@mavame
mavame / gist:5426716
Created April 20, 2013 17:21
My interpretation of Chapter 2 from Pro JavaScript Design Patterns http://www.amazon.com/Pro-JavaScript-Design-Patterns-Object-Oriented/dp/159059908X
// Ch2 from Pro JavaScript Design Patterns
// Interfaces in JS!!
/*
interface Composite {
function add(child);
function remove(child);
function getChild(index);
}
interface FormItem {
@hofmannsven
hofmannsven / README.md
Last active March 22, 2024 19:45
Git CLI Cheatsheet