Tuesday, August 24, 2010

Windows 7 and Mac

Since I've been using Win7 on my desktop, I've been finding some nice ways to integrate it into my daily workflow. My primary machine is a 2006 Macbook Pro 15", and so far the two have been playing well together.

Here are the main programs/utilities that I'm using and some commentary on each.

Dropbox (both)
This is such an integral component that it's listed first. All the files that I'm working on or have ever worked on are in here, and they're available on both machines and through the internet with almost no overhead.

Microsoft Office (both)
This is a requirement for work, and I've got it installed on both machines. The beauty of it is, with Dropbox, I can work on the same file from both machines.

Notational Velocity (Mac) / Resoph Notes (Win) / Simplenote (iPhone/iPad)
Synchronized notes available anywhere? Very yes. Simplenote is the glue that holds it all together, and I can access all my notes from my computers, my iPhone or my iPad. I could sync them all in Dropbox, but I love the Simplenote App (iTunes Link) on the iPhone/iPad and the interface is amazing. I was especially impressed with Resoph Notes on Windows. The interface is simple and it syncs perfectly.

Terminal & X11 (Mac) / SecureCRT (Win) / XManager 3 (Win)
My Mac has an advantage here because Terminal is included and X11 comes with the developer tools (free to sign up and download). On Windows, SecureCRT and XManager are great 3rd party tools, but they run about a few hundred dollars each. In either case, these are my bread-and-butter tools for SSH, Telnet, and xwindows exporting.

Cord (Mac) / Windows Remote Desktop (Win)
Windows would have a slight advantage since Remote Desktop is built in, but Cord is the best RDP client that I've ever come across. And it's free. In fact, I wish there was a Windows version of it.

Google Chrome (Win) / Safari (Mac)
Mac OS X comes with a pretty good browser, but Windows, on the other hand, doesn't. Internet Explorer is getting better, and I'm hoping IE 9 is decent, but out-of-the-box, it's crap. I used to go with Firefox, but Chrome is much faster and I can do without the plugins.

Monday, August 23, 2010

Windows 7 is kind of nice

Dell SX270 Ultra Small Form Factor Computer, 2.66GHz Intel P4 CPU, 512GB DDR Memory, 20GB HDD, XP Professional/COA Extremely Compact Design Ultimate in Quiet Operation Power Source IncludedI managed to scrounge up an old Dell Optiplex SX270 at work and decided to mess around with it. I installed Windows XP SP3 originally, but that was boring, so I grabbed a copy of Windows 7 Ultimate to try it out.

Frankly, I was shocked with the results. Overall, it ran much better on the old hardware than Windows XP ever did, and I really liked the interface overall. The only trouble I had on the install was the video driver. Luckily, techbirdy.com had the video driver I needed. I do get some strange artifacts on some of my video files, but everything else worked flawlessly.

Since it is an older box, none of the Windows 7 flashy UI stuff is turned on, but as a day-to-day workhorse it's turned out really well.

New Goal - One Post A Day

I'm going to try something new and do one post a day for this week (except for weekends; I have a life). The plan is to go with very little editing and see how much content I can put out there. I've got a ton of items in my "Blog Ideas" file, so it should go pretty well. We'll see...

IPad Home Screen

Here's my Home Screen 3 months after getting my iPad. I'll probably get rid of GoodReader since ReaddleDocs has been doing a better job of getting to my documents on-the-go. Ditto with the Notes App. Simplenote is an order of magnitude better.

Wallpaper by mandolux. I got it a while ago, so you'll have to go through the archives yourself to find it.

Managing Humans by Michael Lopp

Amazing book. I've been reading Rands in Repose for a long time, and while a lot of content is taken from the blog, there is a lot more that's exclusive to the book.

You can get the dead tree version from Amazon on the right at a pretty good price (and I get a nice kickback), but unfortunately, the e-book isn't available on any of the online stores for the apps that I use (Amazon Kindle, B&N Nook, Apple iBooks).

However, you can get it straight from Apress here: http://apress.com/book/view/9781590598443

Followup Review on the Macally iPad Case

Macally BOOKSTAND Protective Case and Stand for iPad
So I've had the case for a couple of months now, and it's taken a beating. But it's still doing well in it primary function: keeping my iPad safe from minor dings and scratches. The only two major items are the leather tab and the inside of the cover.

The leather tab started to fray after a few weeks of use. Now, the underside has completely peeled off and it's flapping free. After taking the picture, I cut off the loose end and its much easier to slide into the slot in the closed position. The stand position still takes some tugging to get it through, but it's a minor issue in that case. The major issue is that the cardboard is really wobbly now when standing it up.

The other problem is that the inside of the front cover came off. It looks like it attached to the plastic piece with some glue and just pulled off after frequent use. It's not a big deal, but I do wish it was attached a bit more securely. Ultimately, though, it doesn't detract from the functionality at all.

All in all, I'm still a bit ambivalent about the case overall. It's still protecting my iPad, and I do put it through a lot of daily use. But at around $35, I would have expected it to last longer. I probably won't replace it until it wears out completely, so in that regard, I'll consider it a good purchase if it lasts six months to a year.

Sunday, June 27, 2010

Fantastic Piece in the New Yorker on Elevators

Up and Then Down - The Lives of Elevators (by Nick Paumgarten)

In most elevators, at least in any built or installed since the early nineties, the door-close button doesn’t work. It is there mainly to make you think it works. (It does work if, say, a fireman needs to take control. But you need a key, and a fire, to do that.) Once you know this, it can be illuminating to watch people compulsively press the door-close button. That the door eventually closes reinforces their belief in the button’s power. It’s a little like prayer.

via marco.org

Tuesday, June 22, 2010

iPad Quick Thoughts

I haven't had a chance to write this up properly, so here are the notes I've been taking since I got my iPad. It's pretty rough right now, but I'll properly polish it up later (read: probably never).


  • keyboard a little hard to get used to. iPhone keyboard at 2x seems to be easier to type on, but that may just be familiarity. Although, I’m getting better at typing in landscape mode. Touch typist using three fingers on each hand. Hard when you have to look at the keys but the text is out of your line of sight. Easy to make mistakes and I’m using the delete key a lot. Bluetooth keyboard tons better, but one more thing to carry around and bring out.
  • definitely need an easy-to-carry stand. Made one out of the packing material with mixed success.
  • a case would be ideal. Especially as I’m planning to sell and buy the next generation when it comes out.
  • haven’t put it down since I got it
  • photo frame is great
  • the number of things I can do with it is limited only by what’s on the App store. I expect I’ll be able to do more as the number of ipad apps increases.


  • reboots quickly, although I haven’t had to do this much
  • using the hell out of the rotation lock, wish I had that on my phone
  • touch typing in landscape mode isn’t so bad, but using a bluetooth keyboard is tons better
  • iBooks is amazing
  • I don’t have to charge my phone as much. Seriously, I’m charging every other day as opposed to daily.
  • I can subscribe to RSS feeds now. But only from the desktop Google reader. Issue with mouse over event


  • can’t upload pictures to Facebook/Flickr
    • using upload via email, but it’s not as slick as if there was an app for it. Consequence of being an early adopter.
  • editing blog posts is difficult
  • no apostrophe on the first page of the keyboard

Still using iPhone versions

  • Skype
  • Twitter (Loren Brichter’s version)
  • Facebook

Battery Test

- put into sleep mode at 6:12am @ 31%
11:27am @ 100%
- We Rule for a bit
11:43am @ 100%

12:10pm @ 100%
- played We Rule and Pocket Legends
- Facebook and web browsing
1:10pm @ 87%
- simplenote update
1:20pm @ 86%

1:52pm @ 85%
- iBooks
2:59 @ 75%

- jack doing web browsing and light usage
5:10 @ 72%
- We Rule, web browsing, ebook reading
6:02pm @ 63%

6:34pm @ 62%
- good reader, web browsing
8:25pm @ 47%
- good reader
- wife and the kids playing games
10:01pm @ 33%

- ebooks and games
11:32 @ 16%

Macally Bookstand iPad Case

Macally BOOKSTAND Protective Case and Stand for iPad
Just got this case over the weekend, and it's working out really well. The only two issues I have are that the cover bends a bit if it's left standing up for a while (like, overnight) and the leather tab takes a bit of effort to slide into the back.

Other than that, it's a pretty good investment.

Useful OIDs for Webstar DPC2100 Modems

Rx Power:
Tx Power:

Monday, June 21, 2010

Best App Description Translation

Chalk Board App Description

It can start even more prematurely.

Friday, June 18, 2010

Cisco SNMP Object Navigator

Available here:


Enter the OID or Object Name and you can look it up or browse the OID tree. Amazingly useful when used in conjunction with cacti.

Tuesday, June 1, 2010

How to tell if a description of technology is dated

If the description includes some type of reference to physical media, there's a pretty good chance that the material is outdated.

When CDs first came out, it was touted that you could store 150 Bibles or 4.5 million characters on a single CD-ROM.

Now, these types of measurements are antiquated since we have a different perception of storage space as it relates to media. For example, we know a CD can now hold around 100 mp3's or a single feature film.

But even then, we no longer think in terms of optical storage at all, since a 4GB flash drive goes for less than $10.

Sunday, May 30, 2010

Really digging this song for some reason.

Tuesday, May 25, 2010

Home Screen and iBooks

Home Screen

Home Screen (Wallpaper by mandolux)

Wallpaper by mandolux.

iBooks Shelf

iBooks Shelf

Almost looks like my real life bookshelf.

iPad Goodness

Got my iPad last night, and it's an amazing piece of technology. I've barely gotten much hands-on time with it between synching and letting everyone I know try it out.

It's pretty popular at home and at the office, so I'm going to put it through its paces and hopefully get out another post about it in a week or so.

BTW, this post was written on my iPad using a bluetooth keyboard.

Thursday, May 20, 2010

Android Prototype from 2007


This what a "smartphone" was supposed to look like before the iPhone hit the scene.

(via The Log)

Tuesday, May 18, 2010

scp doesn't support resuming? Use rsync

Since scp doesn't support resuming an interrupted download, rsync is the way to go for getting files from one place to another. And it's other functions are pretty good too.

Here's the command:

     rsync --partial --progress --rsh=ssh  :/target/directory

If you're not using the default ssh port, then you can do --rsh='ssh -p3022'

Monday, May 17, 2010

The New Macbook

The New Macbook is now more powerful than my 2007 15" Macbook Pro, which was top of the line when I bought it.

  • New Macbook vs 2007 15" Macbook Pro
  • 2.4GHz vs 2.33GHz (Core 2 Duo)
  • Up to 4GB Memory vs Up to 3GB Memory
  • 256MB Nvidia GeForce 9400M vs 256MB ATI Radeon X1600
  • 1066MHz FSB vs 667MHz FSB

Access Gmail POP via the command line

Since Google only supports connection using SSL, you can't just telnet to the relevant port (which is 995 instead of 110).

In order to connect, we need to make use of SSL.

In a nutshell, here's the command:

     openssl s_client -connect pop.gmail.com:995 -CApath /System/Library/OpenSSL/certs

I'm using the cert directory on Mac OS X. You'll need to put the path to your own cert directory depending on your OS (usually /etc/ssl/certs on linux).

Sunday, May 16, 2010

Wednesday, May 12, 2010

X11 Forwarding after sudo

Normally, you can do the following:
ssh -X user@host
However, if you need to su - root after logging in, the X11 forwarding setup by ssh will no longer be valid.
Do the following:
<as user> $ echo $DISPLAY
<note down the value>
<as root> # export DISPLAY=<the value noted earlier>
This will set the proper display. However, the Xauthority will not match. To fix that do the following:
# cp /home/<user>/.Xauthority /.Xauthority 
(or wherever the root home directory is)

Tuesday, May 11, 2010

Movist vs Quicktime



  • automatically plays all similarly named video files in the folder (movie1, movie2, etc.)
  • option to open at 2x size
  • can turn volume up 4x past max
  • no scroll-wheel scrubbing, used for volume instead like vlc
  • double-click maximizes, like vlc


  • scroll-wheel scrubbing

Yeah, Movist wins.

The Linux Experiment

I've been a fan of linux since it's inception, and I've watched as it matured throughout the years. At least once a year since about 2001, I've installed it and tried to see if I could use it as my primary operating system.

For the most part, I've always ended up going back to my original operating system (Windows XP/2000 up until 2007, and Mac OS X after that). There were always issues that made it impractical to use on a daily basis.

In recent years, linux has matured considerably, and Ubuntu in particular makes a strong case for a daily workstation.

So, I will attempt to see if I can use linux as my primary operating system.

I'm going to look at the following main areas:

  • Web Browsing
  • Email, Chat, and Skype
  • Network Shares
  • Movies, Music, and Pictures

Test Setup

For this test, I will be using Ubuntu 10.04 LTS Desktop, Lucid Lynx, running on VMWare. LTS stands for Long Term Support, so this is a pretty stable build to run.

I won't go through the setup and install since there's a ton of documentation on that already.

First things first

Before anything else, System updates. Total time: 5 minutes. 10.04 is relatively new, so there wasn't much to update.

But that wallpaper has got to go.

Also, I'll organize the desktop a bit.


  • Change desktop
  • Change desktop resolution to 1024x768
  • Remove multiple workspaces and remove the switcher from the bottom bar
  • Remove Help from top panel and replace with Terminal
  • Add Window Selector and System Monitor to the right side of the top panel
  • Switch to Radiance Theme
  • Set Terminal size and color

Web Browsing

Firefox on Ubuntu works pretty good, but it's pretty slow compared to Google Chrome. Getting Chrome is as easy as going to the website and selecting 32 bit .deb. By default, it opens with the Package Installer and the install was painless.

Browsing is nice and fast, but now we have to address the pain that is flash. But I was in for a surprise since Flash is already installed. In previous versions of Ubuntu, it had to be installed separately, so it's nice to have it out of the box.

Everything feels pretty snappy on Chrome and the browsing experience is great.

Email, Chat, and Skype

Setting up the Evolution email client was pretty easy, but there aren't any configuration guides specific to it. The only note was that in order to specify the port number, you have to suffix the server name with colon and the port. i.e. imap.gmail.com:993

Setting up chat on Empathy was similarly easy.

The good thing about using the installed clients is the integration with the status bar at the top.

Skype has to be installed from the website, but it's an easy install.

So far, things are looking good.

Network Shares

This is a category in which Ubuntu and linux in general has had problems, but 10.04 handled it pretty well. It found the shares and mounted them easily without having to install anything.

Movies, Music, and Pictures

My first test was an m4v file encoded with h264. Movie Player opened the file and then prompted to download the codecs. There were 34 package files on the download queue, so I decided to scrap the incumbent and go with VLC.

VLC opened up the file with no problems and everything worked flawlessly, as expected. Music files weren't a problem either.

For pictures, the Gnome picture viewer worked well and it didn't balk at browsing a folder with over 100 pictures.


So far, Ubuntu 10.04 is proving to be a worthy desktop replacement.

Google Chrome for Mac


  • animating tabs
  • themes
  • speed
  • the video is cool: http://www.youtube.com/googlechromethemes
  • child tabs open next to parent tab, grandchild tabs open next to child tabs, new child tabs open between child and grandchild tabs
  • status tabs popup on the bottom when loading or mousing over a link


  • opening lots of tabs shrinks them. Much better in safari
  • The website icon takes up a lot of horizontal space. Safari's centered text is much better.

Wednesday, February 24, 2010


Shawn Blanc recently put out a Twitter request on how people are using Dropbox and wrote a great article on it. I replied to his request with about 5 tweets and read his article, and while it was good, Shawn's coming in as a new user and I've been using it for over a year. So, I though there were some things missing and rather than just email, I'm going to write a blog about it.

What is Dropbox?
Dropbox was started by Drew Houston in early 2007 with capital provided by Y Combinator, which is basically a firm of investors that provides seed funding for startups. In fact, you could learn everything you needed to know about Dropbox by reading it's Y Combinator funding application.

In Drew's own words,

Dropbox is kind of like taking the best elements of subversion, trac and rsync and making them "just work" for the average individual or team. Hackers have access to these tools, but normal people don't.
And that's basically what it is. Dropbox takes a folder on your computer and syncs it with the Dropbox service and any other computers you install the application on. And, well, yeah there's an App for it too. (iTunes Link)

So what is it good for?
Obviously, you can use Dropbox to sync your files across several machines, but this is only the most basic use case. But let's think about that for a moment. Files aren't just your spreadsheets and reports. You can sync any file that resides on your hard drive.

The basic plan has a maximum of 2GB of storage, but you can upgrade 50GB for $9.99/month or $99/year or 100GB for $19.99/month or $199/year.

With that much storage, you can sync your entire iTunes directory and have your media sync seamlessly across machines. You can even start using it as an offsite backup.

They also added the ability to share folders publicly or between Dropbox users, which is great for collaboration. Although, the contents of the shared folder apply to all the participants quotas.

Beyond that, you can also email temporary public links to any of the items in your Dropbox.

So what am I using it for?
Personally, I like the free plan and prefer the simplicity of having a limit. My motto is if it doesn't fit in the limit, then it doesn't need to be synced. But, full disclosure, I actually have 3.5GB due to referrals. They now have a 3GB limit on extra space gained from referrals.

One of the ways I use used to use it is to sync my notes. I use the crap out of Notational Velocity, and I saved the notes as flat text files saved in a Dropbox folder (instructions here). Recently, Notational Velocity added the capability to use SimpleNote syncing, and I'm now using that. Just don't use both at the same time.

Besides that I sync:
  • my .vimrc file synced between my laptop and all my linux servers
  • all my work documents
  • a copy of MacDrivec in case I need to use my Mac OS formatted external on a Windows box
  • my Hazel rules
  • whatever eBooks I'm reading
  • shared folders with different departments within the company
That last one is especially useful. If I've got a project that I need to pass off to another engineer, I can just drop all my documentation into the shared folder for that department. Or I can collaborate on projects with other people within the company and share documents with the added bonus that all of the work is available online if I need to access it outside of the office.

The iPhone App even saved my ass once. I was leaving for vacation, and work called about a file that they needed from me. So, I used the airport WiFi to email them a public link to the file through the Dropbox App. In addition, I saved the PDF files of my flight confirmation forms in Dropbox so I used it check-in shortly thereafter.

I also use the App to take pictures on my phone that I need immediate access to on my laptop. Take the picture within the App, and it shows up in the folder on my laptop. You can imagine the number of steps that saves.

Game changer
These words get bandied about quite often, but they are incredibly apt in this case. My workflow has changed significantly, and I'm still figuring out new ways to use it. I can't remember what I did without it.

Tuesday, February 16, 2010

Facebook Chat now using Jabber (XMPP)

Facebook is now using the Jabber (XMPP) open messaging protocol for it's chat services. This is great news since desktop clients have had to use workarounds to get Facebook chat working.

Most clients will probably roll out support in an update, but until then there are instructions on how to set it up as a regular Jabber account on the Facebook chat page.

Monday, February 1, 2010

Dell Mini 5

I just came across news of a "tablet" prototype released in early Janurary: the Mini 5.

Gizmodo has a short video of the device as well.

The funny thing is, I see this aimed at at iPhone users rather than iPad users.

Regardless, it looks like a pretty cool device.

HTML5 Video Player - SubLimeVideo

This video player is all HTML5, and it looks amazing.

This bullet point under "Features We Plan to Add" is telling:

  • IE support by falling back to Flash

Internet Explorer is tacked on as an afterthought. Nice.

via daringfireball.net

Friday, January 29, 2010

Cacti Graph for E1s on Cisco AS5350

I stumbled across this thread while searching for a way to graph E1s on a Cisco AS5350. The initial post points to Barry O'Donovan's website post detailing the specifics. I tried importing the xml file directly, but I got an error: "Hash version does not exist". Some more Googling led me to believe that this was related to the Cacti version.

Since I wasn't really in the mood to upgrade Cacti then and there for this one graph, I decided to recreate as much as I could of the graph using the information Barry had helpfully provided.

Data Sources
The first step is to configure the Data Sources. I'm sure there's a way to simplify this, but I haven't figured it out yet, so you'll need 1 Data Source for all active channels and 1 Data Source per E1.

All Active Channels
Go to Data Sources->Add, and use the following:
Selected Data Template: SNMP - Generic OID Template
Host: Choose the host for this Data Source

Click on Create to go to the next configuration page.

Change the following fields:
Name: |host_description| - Active Channels

Click Save and you're done.

E1 x/x
You'll do the same thing for the E1s, except for the following:
Name: |host_description| - E1 2/0
OID: .

The last 2 digits of the OID are the slot and port numbers. For E1 2/0, it's .2.0, for E1 3/1, it would be .3.1

Do this for each E1.

Graph Template

Now, we need to add a new graph template. Here are the fields I changed:
Name: AS5350 E1 Usage
Title (check Use Per-Graph Value): |host_description| - E1 Usage
Vertical Label (check User Per-Graph Value): Channels

Click Create and we'll start creating the actual graph.

Graph Item Inputs
First, we'll need to add our inputs. For this, I'm only going to use 2 E1s to show you how it's done. My production config has 2 templates: one for 2xE1 cards and one for 4xE1 cards.

For now, just add the name and use Field Type: Data Source.

I created 3, one for each E1 and one for all Active Channels.

Graph Template Items
Next, we'll add the Graph Template Items. You'll have 4 entries for each Data Source: the graph itself, and 3 GPRINT values for current, average and maximum.

The last picture doesn't show it, but check Insert Hard Return for the last value. It will show up as

on the main template page.

You should now have the following:

You'll notice I changed the colors around from the previous screenshots. The main things to note are the Graph Item Types and the CF Type.

Also, Cacti may automatically add a Data Source [snmp_oid] field. Go ahead and delete it.

Now, we need to go through our Data Sources and make sure they match up with their graph items.

Save the template and we're ready to create our graph.

Creating the Graph
Go to Graph Management and Add a new graph. Use the template we just created, and then select the appropriate Data Sources. If all goes well, your graph should look like this:

ERROR:the RRD does not contain an RRA matching the chosen CF
This error had me stumped for a while, but I found the answer on this thread on the Cacti Forums.

Here's the crucial piece of information:

LAST appears to work fine in a GPRINT but in an AREA or LINE no joy 
After changing the Line to Average, but leaving the GPRINT as Last, everything worked fine. You can see that the graphs for the E1s are set to Last, but the line graph for all of the channels is set to Average.

Thursday, January 28, 2010

Flash Bitching

Once again, there is much wailing and gnashing of teeth against the lack of Flash on the iPad. Since it's based on the iPhone OS, the lack of Flash support isn't surprising. However, after reading the multitude of comments deriding the device for this perceived shortcoming, I began to wonder exactly how much Flash impacts my browsing habits.

So, for the next month I'll be updating this post whenever I come across a page that requires Flash support in order to be useful.

Therefore, here are my exceptions:
- YouTube doesn't count. Most of the content is streamed in h264 anyway and, besides, there's an App for that.
- Flash ads, banners, etc. don't count either. I use ClickToFlash for a reason.

I'll start off the first entry with the sites that my son goes to for games:
- playhousedisney.com
- mynoggin.com
- assorted others

While searching for Phineas and Ferb episodes, I came across the Phineas and Ferb iPhone App: iTunes Link. It perfectly replicates the games at http://tv.disney.go.com/disneychannel/phineasandferb/

Even though the App is $1.99 and the website is free, it's still a viable alternative to the Flash game.

Flash Porn
Saw this today as well: http://www.cultofmac.com/pic-of-the-day-adobe-uses-porn-to-protest-lack-of-flash-on-ipad/28539

My purely unscientific, and for research purposes only, survey of major porn sites has revealed that almost all of them have mp4 feeds. Score another one for the iPhone/iPad.

Only one instance of Flash since the last update: http://www.raincitystory.com/flash/screenclean.swf

Read in a tweet from @pogue. Cool animation, but these are the kinds of things that I'm thinking HTML5 can do better.

And I'm stopping here. After seeing this, I'm pretty much saying goodbye to Flash.

Thursday, January 21, 2010

Cronjobs in Snow Leopard

Great instructions here: http://www.davidlanier.com/story/cron-and-launchctl-on-mac-os-x-105-leopard

Works perfectly in Snow Leopard. A quick way to check your plist is to do ''open local.your.plist" from Terminal. That will open it in the plist editor and/or complain if there are any errors.

Tuesday, January 19, 2010

Apple to use Bing as default search on iPhone? No. Just, no.

According to a recent Businessweek article, Apple and Microsoft are in talks to replace Google with Bing as the default search engine on the iPhone.

Without even thinking too hard, I can come up with 3 reasons why this is not going to happen.

1. Google still owns the search engine market
Even the article itself mentions that of people who use mobile search, 86% used Google in November while only 11% used Bing. Why would Apple gimp search on the iPhone?

2. Google has a way better track record than Microsoft in regards to search engines
Bing is just the latest incarnation of Microsoft's attempt to be relevant in the search engine game. From MSN search, to Windows Live Search, to Bing, Microsoft has consistently failed to gain any traction. Conversely, Google has been one top almost the entire time.

3. The Apple/Google rivalry is completely overplayed
I doubt that there is anywhere near the level of animosity between Apple and Google as the mainstream media would have you believe.

Monday, January 18, 2010

Geektool Setup

Geektool is a system preference pane that allows you to display different information on your desktop.

Here's my setup:

Disk Information
Type: Shell
Command: df -h

Filesystem      Size   Used  Avail Capacity  Mounted on
/dev/disk0s2   186Gi  182Gi  4.1Gi    98%    /
devfs          113Ki  113Ki    0Bi   100%    /dev
map -hosts       0Bi    0Bi    0Bi   100%    /net
map auto_home    0Bi    0Bi    0Bi   100%    /home
I normally use this to see how much space I'm using on my drives.

System Log
Type: File
File: system.log
Output: Too long to list
A running system.log is pretty useful. If anything seems to be misbehaving, I can check the log and see if there's any crazy going on. I usually only show about 5 or 6 lines of the log.

Type: Shell
Command: ls -alh /var/vm
total 16777216
drwxr-xr-x  16 root  wheel   544B Jan 18 12:10 .
drwxr-xr-x  26 root  wheel   884B Aug 30 15:45 ..
-rw------T   1 root  wheel   3.0G Jan 18 09:01 sleepimage
-rw-------   1 root  wheel    64M Jan  5 17:53 swapfile0
-rw-------   1 root  wheel    64M Jan 18 14:05 swapfile1
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile10
-rw-------   1 root  wheel   512M Jan 18 13:23 swapfile11
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile12
-rw-------   1 root  wheel   128M Jan 18 14:05 swapfile2
-rw-------   1 root  wheel   256M Jan 18 14:05 swapfile3
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile4
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile5
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile6
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile7
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile8
-rw-------   1 root  wheel   512M Jan 18 14:05 swapfile9
As you can see, I'm using quite a bit of disk space on the swapfiles. Right now, most of these are the result of having Safari open with a ton of windows. Mostly, this helps me figure out why I suddenly lost 6GB of space.

Uptime and System Load
Type: Shell
Command: /usr/bin/uptime
14:08  up 12 days, 20:16, 3 users, load averages: 1.19 1.28 1.16
Self-explanatory for the most part.

Battery Info
Type: Shell
Command: perl /path/to/perlscript.pl
The perlscript.pl contains the following code:


my $charge = 0;
my $full = 0;
my $amperage = 0;
my $voltage = 0;
my $cycles = 0;

@powerinfo = `system_profiler SPPowerDataType`;

foreach $item (@powerinfo)
if ($item =~ /apacity/)
@temp = split(/:/, $item);
$temp[1] =~ s/\n//g;
$temp[1] =~ s/\r//;
$temp[1] =~ s/ //gi;
$full = $temp[1];

if ($item =~ /remaining/)
@temp = split(/:/, $item);
$temp[1] =~ s/\n//g;
$temp[1] =~ s/\r//;
$temp[1] =~ s/ //gi;
$charge = $temp[1];

if ($item =~ /Amperage/)
@temp = split(/:/, $item);
$temp[1] =~ s/\n//g;
$temp[1] =~ s/\r//;
$temp[1] =~ s/ //gi;
$amperage = $temp[1];

if ($item =~ /Voltage/)
@temp = split(/:/, $item);
$temp[1] =~ s/\n//g;
$temp[1] =~ s/\r//;
$temp[1] =~ s/ //gi;
$voltage = $temp[1];

if ($item =~ /Cycle/)
@temp = split(/:/, $item);
$temp[1] =~ s/\n//g;
$temp[1] =~ s/\r//;
$temp[1] =~ s/ //gi;
$cycles = $temp[1];

print "$charge/$full mAh | $amperage mA | $voltage mV | $cycles cy | ";

if ($amperage < 0)
$chargetime = $charge / $amperage * -1 * 60;
$chargetime = ($full - $charge) / $amperage * 60;

print int(($charge/$full)*100) . "%" . 
" | " . int($chargetime) . " min".
4207/4831 mAh | 888 mA | 12456 mV | 162 cy | 87% | 42 min
This one took a bit of figuring out. The command system_profiler SPPowerDataType provides all the necessary info, and the Perl script parses that and formats it properly.
Some notable formulas:
% Charge: current charge / capacity (in mAh)
Charge Time:
When on battery, amperage is listed as a negative number since power is being drawn from the battery so we need to multiply by -1 to get a positive value. In that case, the formula is - current charge / amperage * -1 * 60 (in minutes)
When the charger is plugged in, amperage is listed as a positive number representing how much power is being sent to the battery. You also have to calculate how many mAh are left to go for a full charge. In that case, the formula is - (capacity - current charge) / amperage * 60 (in minutes)

Charging Indicator, Battery Health Indicator, and SMART status
Type: Shell (check Display status feedback image)
system_profiler SPPowerDataType | grep Charging | grep Yes > /dev/null
system_profiler SPPowerDataType | grep Condition | grep Normal > /dev/null
diskutil info disk0s2 | grep Verified > /dev/null
Charging Indicator: Green if charging; Red if on battery
Battery Health Indicator: Green if normal; Red if replace soon or other abnormal status
SMART Status: Green if ok; Red if otherwise