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') |
| var MultiSortCollection = Backbone.Collection.extend({ | |
| /** | |
| * Sort by supplied attributes. First param is sorted first, and | |
| * last param is final subsort | |
| * @param {String} sortAttributes | |
| * @example collection.sortBy("last_name","first_name") | |
| */ | |
| sortBy : function(sortAttributes){ | |
| var attributes = arguments; |
| <?php | |
| /** | |
| * @file | |
| * The router.php for clean-urls when use PHP 5.4.0 built in webserver. | |
| * | |
| * Usage: | |
| * | |
| * php -S localhost:3000 .htrouter.php | |
| * | |
| */ |
| .feed-section-header { | |
| margin: 0; | |
| font-size: 1.1em; | |
| $groups: community $community \70, teams $teams \72, college $college \71, for-you $gray \6b; | |
| @each $group in $groups { | |
| &.#{nth($group, 1)} { | |
| color: #{nth($group, 2)}; | |
| .feed-icon { |
| # http://stackoverflow.com/questions/5108876/kill-a-postgresql-session-connection | |
| namespace :db do | |
| desc "Fix 'database is being accessed by other users'" | |
| task :terminate => :environment do | |
| ActiveRecord::Base.connection.execute <<-SQL | |
| SELECT | |
| pg_terminate_backend(pid) | |
| FROM | |
| pg_stat_activity | |
| WHERE |
| #! /bin/bash | |
| if [[ -z $1 ]]; then | |
| APP_NAME=$(basename `pwd`) | |
| else | |
| APP_NAME=$1 | |
| fi | |
| echo "Opening Rails Console for $APP_NAME in vagrant..." | |
| cd ~/vagrant && vagrant ssh -c "cd /pub/$APP_NAME/current && bundle exec rails console" |