Note: Some of these keymapping are specific to IdeaVim plugin. If you don't use IdeaVim (what' wrong with you :)), I've tried to point out where they differ, but I could have missed a few
Ctrl-P
- Popup parameter documentation for method calls
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
1) stopping all running solr processes | |
2) removing the solr folder BUT keep a copy of it accessible in case you need some of the old config, synonyms and such. | |
3) gem uninstall all related gems | |
> for i in `gem list --no-versions`; do gem uninstall -aIx $i; done | |
4) bundle install | |
5) rails generate sunspot_rails:install | |
fontes: |
SPC s c remove highlight | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| | |
| ~SPC f c~ | copy current file to a different location | | |
| ~SPC f C d~ | convert file from unix to dos encoding | | |
| ~SPC f C u~ | convert file from dos to unix encoding | |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
(defun copy-current-line-position-to-clipboard () | |
"Copy current line in file to clipboard as '</path/to/file>:<line-number>'" | |
(interactive) | |
(let ((path-with-line-number | |
(concat (buffer-file-name) ":" (number-to-string (line-number-at-pos))))) | |
(x-select-text path-with-line-number) | |
(message (concat path-with-line-number " copied to clipboard")))) | |
(define-key global-map (kbd "M-l") 'copy-current-line-position-to-clipboard) |
Note: Some of these keymapping are specific to IdeaVim plugin. If you don't use IdeaVim (what' wrong with you :)), I've tried to point out where they differ, but I could have missed a few
Ctrl-P
- Popup parameter documentation for method calls--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
require 'benchmark' | |
Benchmark.bmbm do |x| | |
x.report('Break') do | |
1_000_000.times do | |
break | |
end | |
end |
Git provides a simple way to find out where some code was modified or removed from your codebase. You can use git bisect
for that and the processes can be completely automated.
As example I will try to find out when the method send_email_notification
was removed from the file app/models/person.rb
.
So you have to create a automated bash file, or other kind of script, that should return 0
when the method is found and 1
otherwise. So git can run this script for each commit until it returns 1
, which means that the method was removed in that commit. There's the script we gonna use:
if [[ `cat app/models/person.rb | grep send_email_notification` ]]; then
brew cask install p4v