start new:
tmux
start new with session name:
tmux new -s myname
=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') |
// Want to learn more about Immediately Invoked Function Expressions? Read | |
// this article first: | |
// | |
// http://benalman.com/news/2010/11/immediately-invoked-function-expression/ | |
// 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. |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
# 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. |
title: My First Post | |
date: 2014-04-15 | |
tags: life, photos | |
type: post | |
This is my first post! Hooray! |
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)// we're starting this function with an IIFE http://benalman.com/news/2010/11/immediately-invoked-function-expression/ | |
// 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. | |
var PREDICTIONS = [ |