Skip to content

Instantly share code, notes, and snippets.

View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
cowboy / iife-variations.js
Created Dec 24, 2010
A few variations on writing an IIFE
View iife-variations.js
// Want to learn more about Immediately Invoked Function Expressions? Read
// this article first:
// Parens are used to tell the parser that it's a function expression,
// not a function declaration. If you don't explicitly tell the parser to
// expect an expression, it will throw a SyntaxError exception because it
// sees a function declaration without a name specified.
simme / Install_tmux
Created Oct 19, 2011
Install and configure tmux on Mac OS X
View Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using (iTerm has mouse support)
Then install
# More on mouse support
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
# Atom Cheatsheet.
# Project Key Bindings.
- 'cmd-shift-p': open the command palette.
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file.
- 'cmd-b': look for a file that is already open.
- 'cmd-shift-b': search the list of files modified and untracked in your project repository.
- 'ctrl-0': open and focus the the tree view.
geekforbrains / postachio_example
Last active Aug 29, 2015 Dropbox Markdown Example Post
View postachio_example
title: My First Post
date: 2014-04-15
tags: life, photos
type: post
This is my first post! Hooray!
Kartones /
Last active Apr 13, 2021
PostgreSQL command line cheatsheet


Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
elreimundo / eightball.js
Created Aug 11, 2014
EightBall - intro to JS from an object-oriented perspective
View eightball.js
// we're starting this function with an IIFE
// it's important to start this with a semicolon because otherwise any previously loaded JavaScript might try and invoke
// its last line using the anonymous function that we define here as its argument, and then invoke the resulting return value
// on line 63. That would be silly, yo. So we explicitly end the previous thought with a semicolon.
;(function () {
// we define an array of all of the possible predictions that our eight ball can make.
// unlike in Ruby, the use of all caps is purely conventional; JavaScript has no opinions about
// what capitalized variables mean.