Function | Shortcut |
---|---|
previous tab | ⌘ + left arrow |
next tab | ⌘ + right arrow |
go to tab | ⌘ + number |
close a tab | ⌘ + w |
go to window | ⌘ + Option + Number |
go to split pane by direction | ⌘ + Option + arrow |
go to split pane by order of use | ⌘ + ] , ⌘ + [ |
split window horizontally (same profile) | ⌘ + D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def welcome | |
@show_splash = false | |
if @current_user | |
redirect_to home_path(@current_brand) | |
else | |
@ct_deal = nil | |
@biz_deal = nil | |
@kidz_deal = nil | |
Deal.live_by_brand(MasterBrand.first, @current_region).each do |chkdeal| | |
if check_for_exclusive_deal_access(chkdeal, @current_user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_deals | |
#@orders = @current_user.orders.joins(:brand).where{|q| q.brand.slug == @current_brand.slug }.ordered.order('created_at DESC').paginate(:page => params[:page], :per_page => 10) | |
#other_brands = @current_user.orders.ordered.joins(:brand).includes(:brand).where{|q| q.brand.slug != @current_brand.slug }.map{|o| o.brand}.uniq | |
#@other_brands = BrandDecorator.decorate(other_brands) | |
@brands = SimpleBrand.all + NormalBrand.all | |
@orders = Array.new | |
@brands.each do |b| | |
@orders << @current_user.orders.ordered.joins(:brand).where{|q| q.brand.slug == b.slug}.ordered.order('created_at DESC').paginate(:page => params[:page], :per_page => 3) | |
end |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#Vim Cheat Sheet by jessedearing
gqip
- Reformats paragraph to textwidthgq
- Reformats selection:Tab /=
- Equally spaces based on the = symbol (requires Tabular vim plugin):setf language
- Changes current language:set language=language
- Changes current language<C-a>
- Increments the number under the cursor<C-x>
- Decrements the number under the cursor~
- Toggles case and moves to next character in normal mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias unfocus="for file in $(grep -irl ', :focus' spec) ; do sed -i '' 's/, :focus//' $file; done" | |
-courtesy of richard gould |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redirect_to region_home_path(@user.region) << '?acc=nu' | |
def new_user_created | |
@new_user_created = false | |
if params[:acc] == "nu" | |
@new_user_created = true | |
end | |
end |