Thursday, February 26, 2009

Shellsink Nearing Free Quota

Shellsink has been a pet project of my for the last few months, and it has been fun to put something new out there just to see how people react. My main goal of course was to build something useful. What I didn't anticipate was that I would have to begin paying for hosting so soon. Unfortunately Google has rolled out the non free portion of app engine, and they have announced resulting changes to the service. I had hoped that ad revenue on the shellsink site would pay for whatever app engine hosting costs were incurred, but since 99% of use is at the command line, actually very very few ad impressions are viewed on the site.

The short of this is that very soon shellsink will hit the data storage quota. 1GB of commands, tags, and annotations will have been logged and indexed on the shellsink site. I an trying to get Google to lift the quota for my application. But I have little hope unless one of the Googlers using the service decides to intervene. I expect that late next week shellsink.com will hit the quota and stop accepting commands. BUMMER!

The good news is that all data you have logged there will remain accessable, but if you are like me, that isn't much consolation. So the other good news is that all the source code for the server is going to be in the shellsink Launchpad bazaar repo, so you can keep using shellsink by deploying to your own app engine account. So, it looks like without a deux ex-machina that shellsink.com will have to morph into a non-centralized system.

UPDATE: There is a thread in the google group about this.

Sunday, February 8, 2009

Using shellsink with ZSH is easy


You don't have to use bash to use shellsink. Shellsink will work with any shell that supports the following features:
  • Concept of a command that always executes before your command is run
  • Concept of a history file
  • Concept of appending to the history file each time you run a command
Z-Shell is another great shell and when configured correctly it supports all these things. Here is a set of instructions to make shellsink work for zsh.
  1. Grab the sample zshrc
  2. Concatenate that to ~/.zshrc
  3. make a symlink from .bash_history to .zhistory like this:
    ln -s ~/.zhistory ~/.bash_history
  4. Restart your shell

Easy, right? Here is a list of my References:
  • http://en.gentoo-wiki.com/wiki/Zsh#Shell_History
  • man zshmisc
  • man zsh

Monday, January 19, 2009

ShellSink Server Upgrade

On the same day that our government gets an upgrade, ShellSink gets an upgrade. Specifically, a new version of the server is live! The changes are all performance related and it enables me to bring the client behavior into line with the way google has designed app engine to scale. That is, to make lots of very simple requests instead of fewer complex requests.

Unfortunately, this version is not backwards compatible with older versions of the client. You must upgrade your client! Why would I make such a drastic change? Simple, nobody is using shell_sink but me! That means I'm sure 100% of my users will upgrade. It doesn't explain why I need a blog entry to tell myself about it.

Wednesday, January 7, 2009

How to use tags in the sink.


Tags can be useful in many different ways. I thought I would share some of the ways I use tags.

  1. Using tags to say what computer has logged the command: I set the SHELL_SINK_TAGS environment variable in my bash_profile to indicate what machine logged a particular command like this:
    SHELL_SINK_TAGS=myhost
    This is particularly useful because I let several machines log their commands to the same shell-sink account, and if I didn't do that I wouldn't be able to remember which machine logged what.
  2. Using tags to group commands: Often times when I am working on a particular project I want to indicate that the commands I am issueing are related to that project. This makes it easy to remember the context of commands in my history and helps me find things later. Let's say I have a project called "gloop". When I set down to work on gloop I'll set my tags environment variable to indicate that as follows:
    export SHELL_SINK_TAGS=$SHELL_SINK_TAGS:gloop
    Now any commands issue in the terminal I am working in will get tagged with gloop. When I want to stop tagging with the gloop tag I simply issue the following command
    source ~/.bash_profile
    . If your SHELL_SINK_TAGS variable is defined in a different file than mine you will need to source the appropriate file for your environment. On ubuntu that file is ~/.bashrc
  3. Using tags to control your RSS feed: If you go to the preferences page of your shellsink account you will see that you can turn on an rss feed. You can also filter your rss feed by any tag, so if you only want people to be able to see certain commands in the feed you can choose the appropriate tag from the droplist. As soon as you select something in the droplist only commands with that tag will appear in your RSS feed.
  4. Using tags to pull: The shellsink-client application normally just pushes your commands out to the server, but it can also pull commands from the server and put them into your history file. If you issue
    shellsink-client -pt gloop
    . The most recent 20 commands tagged with gloop will be pulled into your bash history file. This is especially useful for making all the commands for a particular task immediately available in your history file.
These are just a few of the ways you can use tags in shellsink. Some things to remember while using tags. Currently you can only add a maximum of four tags at a time. When adding multiple tags from the client make sure you use a colon delimited list of tags. When adding multiple tags from the web application use a comma delimited list of tags. Enjoy, and please leave your own recipes for working with tags here in the comments.

Photo Credit: sarah parrott

Saturday, December 27, 2008

Why search terms are restricted.


Currently you can only search for two keywords at a time. Shellsink uses Google App Engine (GAE) as the underlying technology. The keyword search implementation provided by GAE is currently quite limited. There is: no substring matching, limited number of keywords and only fields of 500 characters or less are indexable. I know. It is a bummer. Unfortunately, search is a complex problem and I don't have the brains to solve it. I'm going to wait for google to solve it. I predict later versions of the App Engine APIs will improve the search functionality and I look forward to removing these limitations just as soon as Google does.