start new:
tmux
start new with session name:
tmux new -s myname
# 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: |
=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') |
# 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 |
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; |
#! /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" |
.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 { |