thetechmattstan's profile picture. Perl-fu, Bash-fu, PostgreSQL-fu, and other assorted fu's.

Matthew Stanislawski

@thetechmattstan

Perl-fu, Bash-fu, PostgreSQL-fu, and other assorted fu's.

Some really interesting talks yesterday and today at @Postgres_London #postgreslondon

thetechmattstan's tweet image. Some really interesting talks yesterday and today at @Postgres_London #postgreslondon

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


Matthew Stanislawski hat repostet

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

Loading...

Something went wrong.


Something went wrong.