Google Timeline

Just discovered a cool feature of google search. I am sure I am the last person to find it, as I am usually a bit behind, but well … here it is anyway.  Google has a nice Timeline view of info about subjects. You can get this by adding a simple parameter and parameter value ( &tbs=tl:1) to the query string.

Google Address bar

when searching via Google, after entering your search text and running the search, if you modify the resulting HTTP query string and add in the parameter “tbs” and value “tl:1” , which looks like:  “&tbs=tl:1” and rerun that query (different depending on your browser but in most, if you just press the “Enter” key on your keyboard it will run it), you will then see a timeline like:

 

Google Timeline view

 

 

I love reading and writing Regular Expressions

Reading and writing Regular Expressions is the only time I feel I do what people think computer programmers do.

s/(R\w{6}([ ](\w{2,11}|I)){18}\.)/It is like magic\./g

Recursive Grep Example

Nothing really needing explaining here, but wanted an example for doing a recursive grep handy as I can never remember it.

 

grep -RH –include “*.java” TEXT_I_AM_LOOKING_FOR *

 

use vi editor to insert newline char in replace

Something else I have to do and cannot remember and then have to look up.

In vi to insert a newline character in a search and replace, do the following:

:%s/look_for/replace_with^M/g

the command above would replace all instances of “look_for” with “replace_with\n” (with \n meaning newline)

to get the “^M”, enter the key combination “ctl-V” then after that (release all keys) press the “enter” key.

Get PS to display the complete path (on Linux)

Something else I can never remember and waste time looking up is how to display long long long paths when looking at processes with “ps”. Well just a couple of “W” does the trick.

ps -auxww

More on why, later but wanted to put it down while it was fresh