This file contains hidden or 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
| # For context, this was inspired by the RubyRogues podcast #79 where they talked about | |
| # documentation in Ruby, and specifically grumbled quite a bit about the failings of RDoc. | |
| # | |
| # http://rubyrogues.com/079-rr-documenting-code/ | |
| # | |
| # As someone who's spent a lot of time using an IDE for programming C# and Java, I think | |
| # Ruby could do a lot better at putting documentation at our fingertips as we program. | |
| # | |
| # Maybe making the documentation part of the structure of the code would facilitate this? | |
| # |
This file contains hidden or 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
| rvm reinstall 1.9.3-perf --patch falcon --force-autoconf -j 3 |
This file contains hidden or 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
| map <f9> :silent !tmux send-keys -t left 'ruby %' C-m<cr> | |
| map <Leader>rl :silent !tmux send-keys -t right 'ruby %' C-m<cr> | |
| # Clear screen and redrew Vim buffer. | |
| map <Leader>aa :silent !tmux send-keys -t right 'clear; ruby %' C-m<CR>:redraw!<CR> | |
| # Send current buffer to Ruby | |
| nnoremap <leader>g :execute "!tmux send-keys -t bottom 'clear; ruby '" . expand('%:p') . "\r"<cr> |
This file contains hidden or 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
| The other big option here is simply not to use vim: | |
| sed -i 's/pattern/replacement/' <files> | |
| or if you have some way of generating a list of files, perhaps something like this: | |
| find . -name *.cpp | xargs sed -i 's/pattern/replacement/' | |
| grep -rl 'pattern1' | xargs sed -i 's/pattern2/replacement/' | |
| and so on! |
This file contains hidden or 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
| Use pandoc |
This file contains hidden or 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
| Don't set TERM in .bashrc | |
| Start tmux with 'tmux -2' (this will enable 256 colors) | |
| Use the following script to display color palette in terminal: | |
| for i in {0..255} ; do | |
| printf "\x1b[38;5;${i}mcolour${i}\n" | |
| done |
This file contains hidden or 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
| checkinstall -D --fstrans=0 make install |
This file contains hidden or 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
| http://rors.org/2011/07/17/inline-logging-in-rails-console.html |
This file contains hidden or 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
| for i in cpu threads mutex memory; do | |
| sysbench --test=$i run | |
| done |
This file contains hidden or 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
| for i in {0..255} ; do | |
| printf "\x1b[38;5;${i}mcolour${i}\n" | |
| done |