Skip to content

Instantly share code, notes, and snippets.

View akolosov's full-sized avatar

Alexey Kolosov akolosov

View GitHub Profile
let mapleader = ","
" Mappings
map <Leader>r reloadTabUncached
map <Leader>x :restore<Space>
map <C-b> scrollFullPageUp
map <C-f> scrollFullPageDown
map <C-d> scrollPageDown
map <C-u> scrollPageUp
git fetch --all
git reset --hard origin/master
@akolosov
akolosov / gist:4123272
Created November 21, 2012 05:42
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@akolosov
akolosov / gist:4123274
Created November 21, 2012 05:42 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@akolosov
akolosov / .rspec
Created November 25, 2012 15:31
rspec params
--colour --format documentation
@akolosov
akolosov / Gemfile
Created November 25, 2012 15:29
rspec, cucumber, capybara
group :development do
end
group :test do
gem 'rspec-rails'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'factory_girl_rails'
gem 'email_spec'
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# filter=[created|by_phone=922480|by_id=100..1000]
def filter(filtering_params)
results = self.where(nil)
if filtering_params
filters = filtering_params.gsub(/[\[\]\{\}\'\"\(\)]/, '').split(/[\|]/)
@akolosov
akolosov / gist:3682c8118f40b07329b6
Created October 17, 2014 14:44
install last VIM on MacOS X with Lua and Python3
brew install macvim --with-cscope --with-python3 --with-lua --override-system-vim --HEAD