FusionRunner: A Google Fusion Tables prototype

The other day, I kinda sorta got excited about running, mainly prompted by a friend telling me about a half-marathon in May. I’ve been needing to find an exercise outlet for a while, and this may be it. Throughout this experiment, I’d like to track my progress with some level of detail, and mapping/distance measurement seems to be a component of this. There are various services for this, like Nike+, and there’s a really neat one called Smashrun that I’d like to use. The only problem is getting data into it, which is either manual entry or through Nike+, which basically requires you to buy their stuff.

A couple days ago, I found out about My Tracks from Google, an Android app that’s free. I installed it, and successfully tracked my walk back to our house. It was amazing. Once you’re done tracking, you can click a couple buttons and export to a couple different Google services, including something I’d never heard of: Google Fusion Tables.

You can access Fusion Tables here. So far, I’ve got it authenticating with OAuth (which is awesome), and doing a select on the first table, which is the export of my walk data. Here’s what the current output looks like:

As you can see, there’s a LOT of data here. The meat for this application is the last line, which when formatted a little nicer, looks like this:

Ruby walk around school

Created by My Tracks on Android.

Total distance: 1.83 km (1.1 mi)
Total time: 30:06
Moving time: 18:41
Average speed: 3.65 km/h (2.3 mi/h)
Average moving speed: 5.88 km/h (3.7 mi/h)
Max speed: 9.00 km/h (5.6 mi/h)
Min elevation: 29 m (96 ft)
Max elevation: 65 m (214 ft)
Elevation gain: 81 m (264 ft)
Max grade: 0 %
Min grade: 0 %
Recorded: 1/16/12 7:08 PM
Activity type: walking

Holy crap! That’s a lot of data in one row! And I have all of the geometry data too!? Sweet! Anyway, here’s a little program that dumps this to the screen. Soon, I’ll make it do the required stuff to log into Smashrun and input a new run with the stats filled in (of course, only if the activity is running).

Toggling Hidden File Visibility with Applescript

I wrote a quick little applescript today that allows one to show or hide hidden files on demand, since this doesn’t seem to be an option in Finder.  Applescript is a terribly designed language, but it does allow you to easily get crap done in OSX.  I have it in github here, and it’s so concise, I figured I’d just paste the current version here:

set Status to do shell script "defaults read com.apple.finder AppleShowAllFiles"
if Status = "OFF" then
	do shell script "defaults write com.apple.finder AppleShowAllFiles ON"
	do shell script "defaults write com.apple.finder AppleShowAllFiles OFF"
end if
do shell script "killall Finder"

Just download it, open it in the Script Editor (I can double click it), and do Save As. Then, select Application as the type, and do Run Only and save it. Then, hide it away and make an alias to it, and drop that on the desktop. Here’s what mine looks like:

And after I double click that Alias:

I like this – it makes basing things on system configuration really easy.

wget mirroring with external references

I was having trouble mirroring a website that had all its images hosted on a different domain, which happened to be random subdomains of cloudfront.net.  I tried adding *.cloudfront.net to the -D parameter, but that didn’t work.  It turns out it’s smart enough to figure out that all subdomains in the domain list should be included as well:

wget -mkpEK -D www.allshepherdrescue.org,cloudfront.net -H -t 3 \
     --restrict-file-names=windows http://www.allshepherdrescue.org/

This goes into mirror mode, changes relative links to the proper form, fixes the query string urls to static ones, and downloads all files from the domains in the -D parameter.  The manpage details all of this.

Removing advertising from Ubuntu Server motd

Ubuntu is a good product, mainly because it’s free.  They recently started some service called Landscape that lets you graph your server activity or something – I don’t really care as I don’t have hundreds of machines running Ubuntu Server (nor do about 99% of their users).  I got tired of seeing this when logging in over ssh:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Nov 25 06:08:51 UTC 2011

  System load:  0.0                Processes:           79
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 11%                IP address for eth0:
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/
At the moment, only the core of the system is installed. To tune the
system to your needs, you can choose to install one or more
predefined collections of software by running the following

   sudo tasksel --section server

No mail.

I mean, jeez, that’s some text to print on login!  I found out it’s all controlled with this script and directory in /etc/update-motd.d.  There’s a bunch of scripts in there that run in order using normal SYSV startup script logic.  If you do the following, it produces a much nicer message:

sudo rm 51_update-motd 
sudo vi 50-landscape-sysinfoz
  # Change this line:
  # to this line
      /usr/bin/landscape-sysinfo | head -n -2
sudo rm 10-help-text

Now, it should look more like this when you log in:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

  System information as of Fri Nov 25 06:26:45 UTC 2011

  System load:  0.01               Processes:           85
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 15%                IP address for eth0:
  Swap usage:   0%

No mail.

Much more manageable!

An adventure with Debian Wheezy

I installed the new Debian testing release on my NAS, and was so impressed with it I decided to convert my main desktop from Ubuntu 11.10.  I was really unhappy with the new Ubuntu – it kept kicking me into Unity instead of GNOME, sound wouldn’t work, it felt really sluggish, it was packed with stuff I’d never use, etc.  Debian is clean, runs faster, and boots faster (possibly thanks to Linux kernel 3.0).  It automatically recognized and assembled my software RAID, so all I had to do was make a mountpoint and an entry in fstab and exports, run mount -a, then do a quick exportfs -a and everything was mounted and exported.  Brilliant!  To get samba working, all I had to do was add this to /etc/samba/smb.conf:

   comment = Vector
   browseable = yes
   path = /vector/vector
   guest ok = yes
   read only = yes

And do a quick /etc/init.d/samba restart.  Shared!

Sound wouldn’t work at first (a common problem with Linux and the Nvidia GT210/220 HDMI audio), but after I built and installed the latest Nvidia driver, everything kinda started working like magic (I also had to unmute all the S/PDIF channels in alsamixer).  Now I only have a few problems.  The first is default window dimensions.  Here’s what it looks like when I open gnome-terminal:

Yeah, a little bit too narrow, right?  So, every single time I open one, I have to drag it out to be a usable size.  I have 80×24 set in the settings, but those are apparently being overridden by something else in GNOME 3.  Any help on this would be much appreciated.  It happens with other apps to, like KeepassX, so it seems to be something at the GNOME 3 level and not within the terminal app.

Another thing that was annoying at first was the inclusion of Music, Documents, Downloads, etc. in my nautilus favorites area (even though I never use these folders in my home directory).  The solution was simple and can be done with vim, so I was sold.  Just look in ~/.config/user-dirs.dirs and edit/delete whatever you want.  I ended up linking the folders I actually use to where they should be (on my NFS mounted RAID) and deleting things like Documents (those belong on Google Docs, obviously).

Installing wine is a bit weird.  To do it easily, go here, then download all the packages for your architecture one-by-one into /tmp, then do this:

  sudo apt-get install lib32nss-mdns
  sudo dpkg -i *wine*
  sudo apt-get install -f
  sudo dpkg -i *wine*
  sudo apt-get install -f

Yes, I know it’s all there twice, but that’s what I had to do.  Dependencies are weird.  Winecfg will prompt you to install some stuff.  Do it.

Update 2011-11-13

I figured out the problem with the window sizes.  If you set up TwinView with Nvidia driver version 285.05.09 x86_64 in the following way:

  • 1920×1080 monitor at absolute position 0,0
  • 1680×1050 primary monitor at absolute position 1080,0

You can’t move windows on most of the TV screen – it only lets you use about 1/4 of it.  Also, the alt-tab menu stretches out the previews horribly vertically so you can’t actually preview them.  Also, the default window size is stretched as shown above.  I have no idea why all this geometry is dependent on overall desktop size, but it should really be fixed.  After changing it so the 1920×1080 monitor is logically Right of the 1680 monitor in nvidia-settings (which is annoying since it’s hanging on the wall above the other monitor in real life), all the problems I mentioned go away.   It seems like this is a problem with GNOME3, but it could be nvidia’s problem too.  It’s hard to know which bug tracker to report it to, but this setup worked with LXDE and old GNOME, so maybe I’ll try the GNOME people first.

Another thing I did today was adjust my MTU to 9000 on both network cards.  You need a switch that supports jumbo frames for this, and I happen to have one.  If you don’t know if yours does, it probably doesn’t.  Also, I changed my fstab line for mounting the NFS share and the exports line on the NAS to the following, respectively:

/vector/vector,async,no_subtree_check)	/vector	nfs	async,noatime,rsize=32768,wsize=32768	0	1

This should improve performance.

Save As… a dying breed

OK – I’ve been thinking about this for a while, and something in Google+ prompted me to make this post.  It goes like this:

Please don’t change the following:

See that?  See how there’s things like Save As… (I’m looking at you, OSX).  See how there’s actually a menu with entries in it that drops down and allows you to quickly scan text rather than randomly shoot your eyes around a “ribbon” (I’m looking at you, Microsoft Office 2007).  Stop changing this.  We’ve had this design for more than 20 years, so it’s likely quite a few of us are more than a little used to it now.  Also, make all the keyboard shortcuts work right.  For instance, Ctrl-Shift-s should always be Save As… and Ctrl-s should always be Save.  This applies to any and all applications that have some sort of document editing capability.

There.  Just had to get that off my chest.  I couldn’t find Bullets and Numbering in the stupid MS Office 2007 ribbon at work, since they got rid of the entire Format menu and replaced it with the impossible-to-navigate ribbon.  And today I heard there’s no Save As… in OSX Lion – I feel for you, dudes and dudettes.

The Quest for the Best Beef

I’m a pretty big fan of NY Strip Steaks. I usually just buy them from Costco (USDA Prime for about $15/lb). But, recently I’ve been curious about trying some other sources. I already put in an order to Baldwin’s, and I also plan on trying Lobel’s. I’ll also probably get a grill sampler from La Cense Beef. There’s quite a few local places that sell grass-fed as well, so I’ll be trying some of those.  Clark’s Never Sell The Land Farm is on the list.  Should be fun.

This all stemmed from reading these articles:
Ordering Up Beef That Roamed the Range
The first answer here

Update 2011-11-5

I’ve been eating Costco Prime NY Strip all week. The quality is very consistent, and the flavor is buttery and rich. These are cut 1.5″ thick, so you have to let them warm up at room temperature for quite a while before cooking, and you have to adjust Alton Brown’s recipe to about 3-4 minutes in the oven instead of the normal 2 to get it medium-rare. But, when done right, these things are killer. As a starting point, I’m going to give these an 8/10. I think this is fair, and I could always adjust it later if I find something REALLY good that deserves an 11 (or I could just give it an 11/10, maybe that’s the right way).

Costco Prime NY Strip from Store #1000: 8/10

I tried one of the burgers from Baldwin’s today. It was outstanding – I cooked it so it was warm in the center, but still rare enough to get massive beef flavor. I had it with some American cheese and lettuce for a bun, and just a touch of ketchup. This was one of the best burgers I’ve had for quite a while, and I’ll be trying the other three soon with different levels of done-ness. The beef has a bold flavor – it’s rather rich, and very clean. It tastes a lot like Ray’s Hellburger in Arlington if you order it rare. They supposedly grind up high-end roast and steak to make those burgers. These are a little spendy, but so far are definitely worth the premium price.

Update 2011-11-11

I’ve been eating the Baldwin’s beef I ordered, and it’s pretty darn good. The hamburger and burger patties we received are excellent – some of the best ground beef my wife and I have ever had. It’s rare that she even asks for a hamburger, let alone enjoys eating one, and she enjoyed the one I made for her today. There seems to be a perfect mixture of fat in the burger meat – it is just greasy enough to fry without sticking, but not enough to make a puddle in the pan or have to pour off fat – well done! I’ve been eating these burgers anywhere between medium-rare and well-done, and they’re good across the board.  I have to give these a 9/10.

Baldwin’s Beef Burger and Burger Patties: 9/10

I also ordered 2 NY Strip Steaks from Baldwin’s, and I have to say I’m not as impressed as I thought I’d be. The meat is extremely tender, and if you’ve ever dealt with game meat before, it feels a lot like that when raw. It cooks really quickly, and it’s cut about 3/4″ thick. Alton Brown’s steak recipe got it nearly to medium before I knew it (30 seconds on each side to sear, 2 minutes in the oven at 500F). Because of this, one has to let them come to room temperature even longer than regular steaks to avoid the cold-in-the-middle problem. The flavor is really beefy and even a little gamey, which is how I like my burgers, but not how I like my steaks. I’ve read this is a common problem with grass-fed beef – it doesn’t taste buttery and rich like I expect Prime NY Strip to taste. It’s good, but I still prefer the Costco NY Strip at this point. The Costco stuff also costs about $3 less per pound, so there’s that. I’ll give this a 7/10.

Baldwin’s NY Strip: 7/10

KeePassX: The Perfect Password App

Recently, I’ve been having some trouble with passwords. Either the login name is a string I never use, and therefore never commit to memory (like my real phone number that I mask with Google Voice), or the password policy forces me to use a password that I’ll never remember (like sites that keep track of your past passwords, or require 11 characters of alternating symbols, letters and numbers, etc.). Since I use spamgourmet, any site that requires an email address as a username is another puzzle – sometimes I even have to login there to find the right one. Also, I have a concern that if I die, my wife will have real trouble getting into all my accounts, so it would be nice if I could just leave her one password to give her access to all that information. So, I broke down and started using a password organizer app. Now, I have always been averse to using these applications for a variety of reasons (online companies having all your passwords, plaintext in swap space / memory, keyloggers, insecure encryption, etc.), but I managed to find one that’s open source, never caches my master password, widely used, and has extreme cross-platform capabilities. KeePassX is the name, and it’s available in Ubuntu. Installing it is left as an exercise to the reader. Once you get in there and add a few passwords, it starts to look something like this:

It allows you to mask both your usernames and passwords (both optionally) from the top-level view. It has clipboard capabilities, so you can just copy your password to the clipboard by clicking a button, and never see it on the screen in plain-text. Their security is really well-done. But the big realization today was that they have an Android App! This app only need the kdb file from any instance of the application, and of course the password to decrypt it. It’s available in the market too! But, how do you sync changes between your main desktop and your phone? Dropbox! Using the dropbox mobile app, I simply synced the kdb file onto the phone, and then opened it. KeePassDroid popped up and asked if I wanted to make it the default database, and I checked the box. Done.

Now, whenever I make a change, it syncs over Dropbox like magic.

English Instructions for Tomato SIM Cards found in Croatia

tomato signs

With Tomato cheap talk and send SMS messages to all networks in Croatia at the lowest prices simply, without complications and without signing of the contract. What you see, it will be.

practically New Tomato and the number of vouchers can be purchased at retail outlets across the country – in kiosks, shops, supermarkets, post offices, petrol stations.

Tomato SIM Card and Activation

Tomato SIM card is PIN and PUK. During activation, as well as each time you switch your mobile phone, enter PIN number. If you enter the wrong PIN code three times in a row, Tomato SIM card will be blocked. Unblock it by entering the PUK number. If the PUK blocked.

Change PIN

To change your PIN number, enter the following combination: ** 04 * old PIN * new PIN * new PIN #

Note: The PIN number can contain up to eight digits.

Keep your SIM card and PIN / PUK numbers.

After having spent more initial amount of Tomato on your account, you can restore it bonovimaa and e-vouchers in the amount of 20 kn, 50 kn, 100 kn and 200 kn.

Shelf Tomato coupon is 7 days for the vouchers of 20 kuna, 75 days for the vouchers of 50 kuna, 150 days for the vouchers of 100 kn, 225 days for the vouchers of 200 kn.

On each voucher Tomato is 14-digit number needed to activate coupon. Via mobile phone, enter it as follows:

* 103 * 14-digit number 3 (CALL)

Tomato bill can be additional cost and the toll free number 092 99 88 to access the Tomato menu. When you enter a 14-znamekasti number, you can check the new state of their account and Tomato isetka date of its validity.

What I have in my account Tomato?

If you want to check how much money you have Tomato on your account, enter a combination:

* 101 # (CALL)

On-screen mobile appears telegona amount that image in your account.

How I have free minutes and text messages on your account Tomato?

The remaining number belatnih SMS you can find out if you enter the combination * 100 # (CALL)

If you want to know how much you free minutes left, enter the combination * 102 # (CALL)

Where to buy Tomato products? * The Mercator shopping centers, Konzum, Metro Cash & Carry, Emmezete, berries, Interspar Ipercoop

Hurricane Irene: MREs and RACES lessons learned

Last night, I participated in a RACES amateur radio net, manning 2 different fire stations over the course of 12 hours (2000 – 0830).  This was my first time doing something like this, so I brought what I thought I would need:

  • 2m/440 radio (IC-92AD)
  • 12v AGM battery (just in case)
  • Cellphone with unlimited 3g and tethering
  • Laptop
  • Power strip

All of these but the battery proved useful (and the battery is currently useful at home).  But, I found my setup was lacking quite a bit.  First of all, I need a better 2-meter antenna.  My rubber duck performed really well considering the circumstances, but had I been a bit further away, I wouldn’t have been able to get into the repeater.  So, my first purchase is going to be a 2-meter antenna, probably 5/8-wave or larger.  Another ham mentioned using speaker-stands as a tripod, and had a nice little setup of a plywood stand and some sandbags to anchor the tripod.  I’ll probably duplicate this somewhat.  I’ll need to get some long aluminum pipes for a mast, as well.

The power strip really came in handy, especially with these completely awesome wall-wart extensions with passthrough plugs.  They’re stackable, so you can even plug 3 wall-warts into the same single outlet, and leave the power strip at home!  I still like having it – it gives me piece of mind.  I’m going to buy more of these extensions though…

While I was setting up my station, I realized that if I needed to go 12v, many of the power adapters I had used a cigarette lighter adapter (yes, I know the correct term for it now is “auxiliary outlet” but that’s a bit ambiguous IMHO).  I definitely need to incorporate one (or preferably more) of these into the power junction box I plan to build.  The other connector I desperately need to adopt is Anderson Power Poles.  I have about 30 of them and a crimper, so I’m setting to work today to start remedying that.  One thing I found out is there’s a ARES/RACES standard way to mate them (right on red facing away).  But what if you super-glue your connectors that way and run into some nincompoop who did it backwards?  Well, I think creating a polarity switcher by crossing a wire is probably a good answer.  I’ll probably label it profusely once I make it, like one would do with a crossover cable (hopefully).

Driving down the road, I reported several downed trees to the Howard County Emergency Operations Center.  But, I realized that I only had one road flare in the car.  Next time, I’ll bring at least 3 so I can help mark these kinds of hazards immediately.

Another thing that would be great to have is a configurable wall wart that supports quite a few DC ends, polarity reversing and at least several common voltages.  This is really nice to have in the house, and I’d think would be even nicer to have in an emergency.

I really need an SMA -> N-connector cable.  I want to standardize on N-connectors instead of PL-259/SO-239.  I’m looking to buy a really nice one of these.

Finally, I need to get another 2m mobile rig.  An HT works, but it’s too low-power to be a great solution.  Also, it’s nice to be able to have a base station set up, and carry around your HT as a backup if you need to walk away.  Hooking up an antenna is easier and more stable as well.

I highly recommend RACES/ARES operators get a phone with unlimited 3g internet.  I have the Virgin Mobile LG Optimus V, which allows tethering and only costs $25/month with no contract.  You could even keep it deactivated, and re-activate it right before an event if you wanted to save money.  I use it as my main phone, so I keep it paid up all the time.  This kept me online all night even when the fire station didn’t have wireless.  I was able to read and send email, watch radar and weather reports, etc.  If the power or phone lines would have gone down, it wouldn’t have been a problem.

Now to talk about MREs – our power’s been out for 12 hours, so we tried some MREs today:

  • Italian Style Sandwich: 4/10.  This was pretty terrible.  I had it when I got home, then went to sleep.
  • Buffalo Chicken Entree: 8/10.  Very good.  Kind of saucy, but Kelsey and I (and Ruby) all liked it.
  • A-Pack Chicken Noodle Entree: 9/10.  This was my favority.  It needs copious amounts of pepper, but it’s totally worth it.