Wednesday, February 24, 2010

Dropbox

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
OID: 1.3.6.1.4.1.9.10.19.1.1.4.0

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: .1.3.6.1.4.1.9.10.19.1.1.9.1.3.2.0

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.

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

2010-01-29
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.

2010-02-01
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
Output:

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
Notes:
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
Notes:
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.

Swapfiles
Type: Shell
Command: ls -alh /var/vm
Output:
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
Notes:
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
Output:
14:08  up 12 days, 20:16, 3 users, load averages: 1.19 1.28 1.16
Notes:
Self-explanatory for the most part.


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


#!/usr/bin/perl


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;
}
else
{
$chargetime = ($full - $charge) / $amperage * 60;
}


print int(($charge/$full)*100) . "%" . 
" | " . int($chargetime) . " min".
"\n\n";
Output:
4207/4831 mAh | 888 mA | 12456 mV | 162 cy | 87% | 42 min
Notes:
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)
Command:
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
Output:
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

Tuesday, November 3, 2009

sudo Resets PATH Environment Variable

After setting the proper path for your user account, you can use the -E switch to have sudo preserve the user environment.

From the man page:

-E  The -E (preserve environment) option will override the env_reset option in sudoers(5)).  It is only available when either the matching command has the SETENV tag or the setenv option is set in sudoers(5).


To whit:

$ sudo -s -E