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 |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |