Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
- gcc
Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
# ... | |
gem "sinatrify" | |
# ... |
Taken from Zach Holman's "Git and Github Secrets".
t - quickly jump through files (similar to cmd+T
in VI or Text Mate)
w - quickly switch branches
s - search
if Rails.env.production? | |
slow_logfile = File.open(Rails.root.join("log", "slow.log"), 'a') | |
slow_log = Logger.new(slow_logfile) | |
slow_log.level = Logger::INFO | |
ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, start, finish, id, payload| | |
duration = (finish - start) * 1000 | |
StatHat::API.ez_post_value("rails request duration", "info@stathat.com", duration) | |
view_time = 0 | |
db_time = 0 |
# encoding: UTF-8 | |
# naravno, instalirati gem sa `gem install sort_alphabetical` prije upotrebe | |
require "sort_alphabetical" | |
puts ["ažbuka","čimpanza","zavičaj"].shuffle.sort_alphabetical |
This is the tutorial that explains you how to use different Rails and Ruby versions on your machines.
It assumes you're using Ruby Version Manager.
rails _<VESRION>_ new test_app
E.G.
"" Used for codeschool color theme | |
color codeschool | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
autocmd User Rails let b:surround_{char2nr('-')} = "<% \r %>" " displays <% %> correctly | |
" highlight lines longer than 80 chars | |
highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
match OverLength /\%81v.\+/ |
# this file provides a method for formatting color using ascii escapes | |
def color(color, content) | |
style = {'clear' => 0, | |
'bold' => 1, 'underline' => 4, 'blink' => 5, 'hide' => 8, 'black' => 30, 'red' => 31, | |
'green' => 32, 'yellow' => 33, 'blue' => 34, 'magenta' => 35, 'cyan' => 36, 'white' => 37, 'bgred' => 41, | |
'bggreen' => 42, 'bgyellow' => 43, 'bgblue' => 44, 'bgmagenta' => 45, 'bgcyan' => 46, 'bgwhite' => 47} | |
if style[color] != nil | |
"\033[#{style[color]}m#{content}\033[0m" | |
else |