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
| gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
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
| 80 def inspect | |
| 81 variables = (instance_variables - uninspect_variables).collect do |name| | |
| 82 "%s=%s" % [name, instance_variable_get(name)] | |
| 83 end.join(' ') | |
| 84 uninspect = uninspect_variables.collect do |name| | |
| 85 var = instance_variable_get name | |
| 86 "%s=%s[%i]" % [name, var.class, var.size] | |
| 87 end.join(' ') | |
| 88 sprintf "#<%s:0x%014x %s %s>", self.class, object_id, | |
| 89 variables, uninspect |
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 |
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
| 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
| 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
| 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
| 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
| 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
| 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> |
OlderNewer