Skip to content

{ Author Archives }

FastComplete, making bash completion fast on remote file systems

Here at Google we have quite a few remote file systems which contain various tools we use in our day-to-day work. As typing sucks we generally want the tools in our $PATH. When you try to tab complete Bash needs to stat a couple of thousand files and even on fast remote file systems this takes a drastically long time.

I wrote FastComplete as a solution to this problem. The tool creates a local cache of links on your hard drive to everything in your $PATH. It uses a couple of tricks to make sure all the stats remain locally, while still allowing the remote file to change without needing to update the cache. Linux should also keep this information in memory disk cache making tab completion almost instant again. Yay!

You can find FastComplete at https://github.com/mithro/rcfiles/blob/master/bin/fastcomplete It is a stand alone python program which shouldn’t have any non-core dependencies. The usage documentation is as follows;

Fast complete creates a local disk cache of your path.
It’s specifically designed to make bash tab complete run much faster. The correct fix would be to add caching to bash, but it was to hard to do so.

To find out what path fastcomplete is currently using:

> ~tansell/bin/fastcomplete
# Found 3977 commands
export PATH=/home/tansell/bin: ... :/home/build/google3/googledata/validators:/home/build/google3/ads/db

To get fastcomplete to rebuild it’s cache:

> ~tansell/bin/fastcomplete --rebuild
# Using path of '/home/tansell/bin: ... :/home/build/google3/googledata/validators:/home/build/google3/ads/db'
# Cache /usr/local/google/users//tansell/tabcache/d7e5fb63454ae33b4a171b6437be904a did not exist! Rebuilding....
# Looking in: /home/tansell/bin (execv)
...
# Looking in: /usr/bin (symlink)
...
# Looking in: /home/build/google3/ads/db (execv)
# Found 3977 commands
export PATH=/usr/local/google/users//tansell/tabcache/d7e5fb63454ae33b4a171b6437be904a

To use fastcomplete all the time add the following as the *LAST* line in your ~/.bashrc file. Fastcomplete will echo some output to stderr so you can see what is happening.

# Create a cache of the command
eval `~tansell/bin/fastcomplete $PATH`

Pretty incredible short film

Pretty incredible short film

mel peifer originally shared this post:

AMAZING!! i just saw this in the g+ film festival.

i cried. this is incredible!

+Unofficial Google+ Film Festival

Posted via Google+ Tagged

A typewriter that types colors!

A typewriter that types colors!

Janet Hawtin originally shared this post:

http://tyreecallahan.tumblr.com/post/13602352689/this-is-the-chromatic-typewriter-my-entry-to-the

Tyree Callahan | This is the Chromatic Typewriter, my entry to the…

This is the Chromatic Typewriter, my entry to the 2012 West Prize competition. The prize is awarded via popular vote this year. Click the source to get to the West Collection and to download the West….

Posted via Google+ Tagged

Almost my complete board game collection

Almost my complete board game collection

From the top
* Shroom Bloom
* Sandwich
* Aquarium (plus expansions)
* Experiment (plus expansions)
* Space Mission
* Space Bastards
* Lemming Mafia
* Space Maze
* Paperclip Railways
* Galaxy Trucker + Galaxy Trucker The Big Expansion #
* Undermining
* Settlers of America: Trails to Rails
* Ticket to Ride: Nordic Countries #
* Ticket to Ride: Asia Expansion
* Ticket to Ride: 1912 Expansion
* Soul Hunter
* Modern Society
* Stargate SG1 #
* Battleship Galaxies

Things missing
* Interstellar Mayhem
* Ticket to Ride: Dice expansion
* Pandemic + On the Brink Expansion #
* Space Alert + Space Alert Expansion #
* Cosmic Encounter

I have only played the games marked with a hash. Who wants to play some board games?

Spreadsheet at https://docs.google.com/a/mithis.com/spreadsheet/ccc?key=0ApVlNZ_Rvdw6dDh3SEIwT3ZWcXBzVFNkYzR2aVVxTHc&hl=en_US#gid=0

Posted via Google+ Tagged ,

Well I can now officially say I’ve been around the world!

Well I can now officially say I've been around the world!

Sydney International Airport

5 Ross Smith Ave, Mascot NSW 2020, Australia

Posted via Google+ Tagged

Something for Greg. Didn’t have adult sizes.

Something for Greg. Didn't have adult sizes.

Posted via Google+ Tagged

My lunch a Jurong Bird Park.

My lunch a Jurong Bird Park.

Jurong Bird Park

2 Jurong Hill, Singapore City 628925

Posted via Google+ Tagged

These are almost as awesome as they look. The white one contains a chocolate with faint Vegemite hints. The purple one a yellow custard. The green one a green almost minty jelly.

These are almost as awesome as they look. The white one contains a chocolate with faint Vegemite hints. The purple one a yellow custard. The green one a green almost minty jelly.

Jurong Bird Park

2 Jurong Hill, Singapore City 628925

Posted via Google+ Tagged

Im being eaten alive!

Im being eaten alive!

Feels kinda like a more pleasant pins and needles.

Unknown address

20 Netheravon Rd, Singapore

Posted via Google+ Tagged

All gone!

All gone!

Seoul Jongno-gu Donui-dong

Posted via Google+ Tagged