Thursday, July 28, 2011

tmux repeating keys

When upgrading from tmux 1.1 to 1.5 I found a few key bindings changed slightly. In particular, the arrow keys used to switch panes now repeat.

I often use the sequence C-b Down immediately followed by Up and then Enter to re-run a unit test. With 1.5 I was doing this too quickly (tmux's repeat-time is 500ms by default) so I was switched back to my previous pane. To fix this I simply added the arrow keys to my .tmux.conf without the -r option:

bind-key Up select-pane -U
bind-key Down select-pane -D
bind-key Left select-pane -L
bind-key Right select-pane -R

Tuesday, July 26, 2011

Invalid tmux term causes irssi issues

Today I finally switched my long-running IRC screen session to tmux. I rarely disconnect so I was simply waiting for a "good" time.

After a few minutes I noticed that my irssi scrollback was misbehaving; only half of my window would redraw when I pressed PgUp of PgDn.

I had manually set "TERM=xterm" in my bashrc; however, tmux advises only using "screen" or "screen-256color" as the term. I have no idea why I had specified term within my bashrc; removing the line and restarting tmux corrected the issue.

http://tmux.cvs.sourceforge.net/viewvc/tmux/tmux/FAQ

Friday, June 24, 2011

irssi autolog options

My favorite IRC client is irssi. I keep a log of my conversations using autolog; however, I dislike logs from chanserv, nickserv, and other random bots which I'll never reference. I discovered that autolog has a setting to ignore them:
/set autolog_ignore_targets chanserv nickserv 
While searching I also found log_create_mode; irssi's default file mode is 0644. I prefer to keep my conversations private unless I specifically broaden permissions:
/set log_create_mode 0600
 Now new messages and channels are private until I chmod them.

Tuesday, June 21, 2011

Primary instances on a node

Sometimes I need a space delimited list of instances on a Ganeti node. There isn't a direct command to get this but an easy bash one-liner:
gnt-node list --no-headers -opinst_list $node | tr ',' ' '
pinst_list fetches the primary instances on the node. You can replace this with sinst_list for the secondaries.

Wednesday, June 8, 2011

Chrome OS and Passwords

I have been using the CR-48 / Chrome OS for the past few weeks. I really enjoy using the OS but I don't think it could replace my Macbook Air (yet). I agree that the CR-48 is incredibly underpowered and has a terrible trackpad but this is "beta" hardware. I am excited to see how the hardware from Samsung and Acer compare.

My biggest annoyance? ChromeOS breaks my security routine. I currently use Keepass (with Dropbox) to create and store passwords. I trust Google... but I am not comfortable storing my passwords using Chrome sync. Yes, I am storing my password file on another cloud service (which is known to be unencrypted) but I feel safer knowing that my password file is encrypted under my parameters.

I also care about the accessibility of my passwords. The Dropbox + Keepass solution provides access everywhere (Mac, Windows, Linux, Android, iOS). What happens when I cannot use Chrome? I often use other browsers for mobile, cross-browser testing, and accessing different Google accounts. What do you do when you cannot use Chrome that is logged in with your personal account? A web interface would improve accessibility but be an obvious target for attacks, just like LastPass.

Monday, May 16, 2011

Logan eye followup

Today we had a pre-surgery exam for Logan's eye. His right eye consistently angles up and inward when he looking in certain directions. Our doctor was concerned that he is not using both eyes when this occurs. We decided to proceed with the scheduled surgery which will weaken the Inferior Oblique muscle. It should correct the issue but there is a slight chance that we will notice it in the left eye afterwards.

Hopefully Logan's eyes will only be red for a few weeks. Our doctor said that it will be safe for him to rub his eye so arm restraints (while sleeping) will not be required.

Informative sources:
http://www.chkd.org/HealthLibrary/Facts/Content.aspx?pageid=0183
http://en.wikipedia.org/wiki/Inferior_oblique_muscle

Sunday, April 17, 2011

Switching back to king size.

A few months ago Jenna and I decided to switch from a king bed to a queen. We lasted a couple of months; however, today we decided to switch back. Sadly this means we purchased a new bed frame and mattresses. It's amazing how much the extra bit of space can really mean. We cannot wait for the new bed to be delivered (in 9 days).

Monday, April 4, 2011

HTC Thunderbolt: First day

The first day with the Thunderbolt went well. Everything is configured and I'm enjoying the phone... with one major exception. The power button on my device certainly is not right. The best I describe it as is squishy. It's nearly flat with the top of the phone and does not make any physical click when depressed. Jenna's phone seems just fine so I'll try to swap mine tomorrow.

I tried to start working on a widget to toggle 4G; however, I'm stuck waiting on HTC Sync to download which is crawling at 8 KBps. Maybe tomorrow - I tweeted HTC a few questions too.

4G LTE Toggle?

I really wish there was a simple 4G LTE toggle widget for the Thunderbolt. There are a couple of apps in the Market which open the testing menu; however, it should be easier.

So, why isn't there one? Looks like there is not a predefined network connection type in the API: http://developer.android.com/reference/android/net/ConnectivityManager.html.

Normally I'd expect to see a ConnectivityManager.TYPE_LTE but that type doesn't exist yet. The signature for setNetworkPreference is int, so I may be be able to call getNetworkPreference to determine the LTE integer value, store it in a constant, and then reference it later. If the signature is really the enum, I may be out of luck.

Maybe I'll try this when I get home - if I have time. Maybe someone else has already tried it...

Sunday, April 3, 2011

HTC Thunderbolt: first impressions

Purchased two HTC Thunderbolt phones today, one for me and one for Jenna. Initial impressions:
  • Larger screen is beautiful (compared to OG Droid)
  • Hardware feels solid, good weight
  • 4G is extremely fast - reinstalled all apps in seconds
  • Sense 2.0 seems better than previous versions.
    • New skins look better (using slate)
    • Calendar agenda widget looks great and is extremely useful
    • UI feels more responsive
  • There is still a lot of bloatware (city id, blockbuster, etc)
    • Less of this runs by default, still more than I would like
  • The physical power button could be better
    • doesn't have a physical "click" when pressing
    • sometimes have to press down slightly harder
I have disabled 4G on both phones - just using 3G unless we need to stream something large. I read a lot of reviews saying the 4G drains the battery. So far the battery seems reasonable but I have not used it long enough to determine.

Thursday, February 3, 2011

There's no special prize.

There's no special prize.

I love when companies have a sense of humor. Redbox demonstrates theirs by reminding customers "There's no special prize for putting the dvd back in the case the right way. But you'll be a better person for it."

Sadly I have received a few damaged disks from redbox (and Netflix) - I often wonder what people do to them. Do their dogs maul them? Kids toss them around the house?

Tuesday, February 1, 2011

Desktop / Web notifications

Inspired by GMail's recent release of Desktop Notifications, I decided to research the feasibility of using them to replace the notification area for an application I work on. Since I develop for a small internal group I can target newer browsers such as Chrome and Firefox.

The W3C specification for Web Notifications is still in draft but outlines the concept well. The website must request permission and then may publish notifications for the browser to display.

Google Chrome / Chromium
Chromium has published their API specification and it closely resembles the W3C specification. The onclick attribute is currently missing and onshow is called ondisplay.

Firefox
Sadly Firefox 4 will not have support for Web Notifications. Bug 594543 is currently tracking the implementation for a future version but does not have a milestone listed. It's slightly concerning that the bug author is already suggesting a deviation from the W3C specification - they would rather include a callback on the Notification constructor instead of implementing the onshow, onclick, onerror, and onclose attributes.

Examples:

The last example uses setTimeout to call cancel after 15 seconds. This seems like a good way to ensure the popup is closed; however, I'm slightly surprised they did not call setTimeout within the Notification's onshow method. Unless the notification is immediately displayed the setTimeout timer is needlessly wasting time. The rationale for this choice may be because there is no guarantee that the onshow method will be called immediately.

Monday, January 31, 2011

Hide the gutter by default in TextWranger

I use TextWranger to maintain several simple text files on my mac. The past few updates included a gutter area which is visible by default. Since these are simple text files I did not wish to see it but could not locate a way to disable it within the UI.

I browsed the Google Groups and found a thread which exposes the setting using defaults. In short:

defaults write com.barebones.textwrangler Editor:Gutter -bool false

Now TextWranger opens with it hidden but I can quickly enable it if needed. I am using version 3.5.3 - hopefully it will be a visible option in future versions.