
Matthew Stanislawski
@thetechmattstan
Perl-fu, Bash-fu, PostgreSQL-fu, and other assorted fu's.
Was dir gefallen könnte
In vim, to see changes before a save: :w !diff % - (Requires diff be installed, of course)
Simple awk solution to do the equivalent of head & grep simultaneously: stackoverflow.com/questions/1993…
TIL: cut -c 1-[n] to truncate lines at a specific width. (Weird how you can go 15+ yrs not knowing something so basic, until you need it!)
In bash, you can pipe to (head; tail) if you want to peek at both ends of a file/stream in the same go. Who knew!
Shell: Wondering how to achieve the effect of nested backticks (`), without all the ugly backslashes? Use $(command) substitution instead.
Handy vim script: Remap * to search for word under cursor WITHOUT jumping to the next match / scrolling the window: is.gd/nhSwfg
We couldn't be more excited to officially announce Divvy, an iPhone app that changes the way people split the check: divvythatup.com/presskit/press…
I wonder how closely a preference for perl vs. python tracks with resenting or appreciating twitter's 140-char limit. #StrengthInStructure
Haha, somebody invented a foot pedal for vi -- love it! The VIM Clutch: github.com/alevchuk/vim-c…
If you write shell scripts in vim, the matchit plugin is a godsend! :help matchit-install
Whoa, shift-f makes 'less' behave like 'tail -f' ! How did I never know this?
In readline programs (such as psql), M-C-j switches from emacs to vi command editing mode. Conversely, C-e switches from vi back to emacs.
In vim, ctrl-g shows the current file name. I knew that. Typing 1 then ctrl-g shows the filename *with full path*. I didn't know that!
Most screen users probably know this, but I didn't: To switch to a window > 9, use C-a ' and type the number, or C-a " for a list.
If one of vim's filetype plugins is overriding parts of your .vimrc, get acquainted with the ".vim/after" directory: bit.ly/aodNko
Eventually, somebody's going to add a linux builtin called "corntab" and finally punish me for years of careless typing.
bash: Running a bg process inside a loop: Why does "&;" error? Both symbols terminate lists, so the ";" is extraneous. http://goo.gl/YRPDC
If vim is set to ignorecase, /blah\C will force case sensitivity for that one search. Likewise, if noic, use \c to ignore case just once.
United States Trends
- 1. Bears 89.1K posts
- 2. Jake Moody 13.5K posts
- 3. Snell 24K posts
- 4. Caleb 49.2K posts
- 5. Falcons 51.1K posts
- 6. Bills 141K posts
- 7. Josh Allen 26.4K posts
- 8. Jayden 22.8K posts
- 9. #BearDown 2,350 posts
- 10. Swift 291K posts
- 11. phil 171K posts
- 12. Ben Johnson 4,393 posts
- 13. Joji 28.5K posts
- 14. #Dodgers 15.3K posts
- 15. Turang 4,295 posts
- 16. #RaiseHail 8,447 posts
- 17. Troy Aikman 6,413 posts
- 18. Bijan 32.6K posts
- 19. Roki 6,142 posts
- 20. Happy Birthday Charlie 6,866 posts
Was dir gefallen könnte
Something went wrong.
Something went wrong.