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')
atom_WM_TAKE_FOCUS ::
X Atom
atom_WM_TAKE_FOCUS =
getAtom "WM_TAKE_FOCUS"
takeFocusX ::
Window
-> X ()
takeFocusX w =
withWindowSet . const $ do
main = xmonad defaultConfig {
-- Modify the log hook of your configuration to include a call to
-- takeTopFocus before setWMNAme
logHook = takeTopFocus >> setWMName "LG3D"
}
@tobyhede
tobyhede / install_rails.markdown
Created November 20, 2010 23:37
From 0 to Rails in several whiles using homebrew and rvm
@tobyhede
tobyhede / async_rails.markdown
Created November 21, 2010 11:50
Notes on Asynchronous Rails
anonymous
anonymous / JS Objects
Created January 4, 2011 04:35
is this insane?
Object.prototype._create = function(opts) {
function F() {};
F.prototype = this;
var f = new F();
f._includes();
if (!f.initialize && opts) {
f.initialize = function(opts) {
$.extend(this, opts);
}
@StuartFeldt
StuartFeldt / daft.php
Created February 11, 2011 01:01
Daft PHP
<?php
//
// For my Dell Inspiron 6400. I miss you.
//
for($k=0; $k<16; $k++)
{
for($j=0; $j<4; $j++)
{
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
#!/bin/sh
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
usage=$(
cat <<EOF
$0 [OPTIONS] start/stop
-s set speed default 256Kbit/s
-p set port default 3000
-d set delay default 350ms