Monday, January 26, 2015

Dropbox setup for shell scripts

There are quite a few shell scripts that that I have to have for my bash environment. For the last few years, I've backed these up to Dropbox and used symbolic links to insert them into the system.

Within Dropbox itself, I have a Scripts directory that I keep all my scripting files in. Most of these are dotfiles and in order to display them properly in Finder and other utilities, I prefix the word "dot" to the beginning and use CamelCase for readability. For example, my .profile is named dotProfile in the Scripts directory.

Here's a brief rundown of the files that I normally use:

.profile -> dotProfile

This mostly contains the aliases that I've accumulated over the years and a few shell settings.

alias ls='ls -G'
This basically shows document colors in the ls output. I could also set the CLICOLOR and LSCOLORS environment variables, but this is usually easier for me.

export HISTSIZE=10000
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
These three commands control the bash history. The HISTSIZE setting allows for a maximum of 10,000 lines to be saved in bash history. 

The HISTCONTROL setting removes duplicate lines from the history. I have a tendency to do ls a lot and it keeps my history from getting cluttered with multiple lines of the same thing. There's some interesting info on this setting in this StackExchange question.

The histappend setting has to do with the way bash handles multiple simultaneous sessions. Normally, the history is written at the end of each session and the file is overwritten. This setting appends new history lines at the end of the file instead.

.bash_history -> dotBash_history

If I'm going to all the trouble of making sure my bash history is the way I want it, I might as well back it up in Dropbox and have it available for parsing outside of a bash prompt.

.ssh -> dotSsh

This one is actually a directory and contains all my SSH settings. It's most important for having my authorized keys and known hosts available again whenever I have to reinstall or upgrade my OS. There are some security concerns that you need to take into consideration when saving information like this, but it's probably too long to go into on this post. I'll probably write it up someday.

.vimrc -> dotVimrc

Obviously vi/vim is my editor of choice. I've been using it for years, and have the options setup the way I like. I basically set the following:
  • syntax on
    • Turn on syntax highlighting. Works with most major programming languages, but I mostly use it for bash and Perl.
  • set showmode
    • Show the current mode on the last line
  • set number
    • Show line numbers
  • set ruler
    • Show the ruler, which is basically line and character position separated by a comma
  • set autoindent
    • Use smart autoindenting. Useful for keeping codeblocks in order.
  • set nocompatible
    • Reduce compatibility with vi in order to use more advanced features of vim.




Thursday, January 22, 2015

It's been a while ...

My last post was September 9th, 2012. Geez, that's a long time. Might as well get back into it.

Sunday, September 16, 2012

DaisyDisk Live Updates Icon While Scanning

DaisyDisk (Mac App Store Link) is a utility for scanning hard drives and presenting the used space in a beautiful interactive map. It's a great app, and it works wonderfully well. But it wasn't until today that I noticed the amazing attention to detail by the developers.

While scanning on of my hard drives, I noticed that the icon updates itself with the scanning progress on both the Dock icon and the icon used when cmd-tab is invoked. Sadly, I was unable to get a screenshot of the latter.

Dock icon at 45% of scanning complete

Dock icon at 70% of scanning complete

Monday, September 10, 2012

Google Chrome for Mac (retro-post)


This was written when Google Chrome was just released for Mac in 2011, but it sat in my Drafts folder since I never got around to writing a full post.

Chrome has since become a permanent addition to my dock, so it's interesting to see my thoughts when it was first released. I've added annotations for some of the items in hindsight.

Likes


  • animating tabs
  • delete to go back to previous page (I still use this alot and get annoyed when a browser doesn't support it, *mumble*Safari)
  • themes (I liked them at first, but stopped using them after about a week. The clean look is much nicer.)
  • speed (It's still a really fast browser)
  • 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 (Safari now does the same thing for child tabs)
  • status tabs popup on the bottom when loading or mousing over a link
  • unified search field (Safari 6 has this now as well.)

Dislikes


  • opening lots of tabs shrinks them. Much better in safari. (This is still relevant. Also, Safari 6's new Tab View is much nicer.)
  • the website icon takes up a lot of horizontal space. Safari's centered text is much better. (Still relevant.)

Tuesday, August 21, 2012

Relativistic Baseball by XKCD

This is what makes Tuesdays awesome.

Laziness or Busyness

I haven't posted here for almost a year, but I've been pretty involved with a ton of projects at work. I spent quite a bit of time building an HSPA+ Network for my company. We did that in about 5 months, which has to be some kind of record.

Other than that, I've been focused on other things. Hopefully, I'll be back on here a bit more for all 7 of you that read my blog last month.

Cheers.

Tuesday, September 27, 2011

MYTH: Apple is a marketing company

The best rebuttal I've seen for this myth:

"Apple Is A Marketing Company" at Brian S Hall's blog

Other company's commercials focus on pizazz and marketing. Apple focuses on people using its products. Marketing my ass.

Thursday, September 22, 2011

Great Printable Productivity Tools

Productivity Tools by David Seah.

There's so much good stuff here.

Tuesday, September 13, 2011

Manu Samoa Prayer

‎"Our players who art in Blue, Rugby be thy game.
When full-time come, thy will be done, in 2011 as it was in '91.
Give us each game our daily victory, and forgive us our previous shortcomings...
As we forgive those who coached in '07 (and after '91).
And lead us not to knock-out round failure, but deliver us from World Cup drought.
In the name of Fats, Birtwhistle and the Holy Samoa islands.
AMEN!"
GO BLUE!
(via Mark Esau and family)

Friday, August 19, 2011

Twitter Mobile now available for Bluesky customers in American Samoa

Announcement tweet:

http://twitter.com/#!/twittermobile/status/104598670225309696

This was actually a lot of fun to set up. It was really cool working with the team at Twitter, and actually implementing a service to interface with something as big as Twitter was really gratifying.

The only downside is that I've been killing the battery on my phone with all the texts.

Thursday, August 11, 2011

Movist

I have three apps on my Mac for playing movies:
- Quicktime (included in the default install)
- VLC
Movist


Movist is currently my default video player for everything except wmv files which VLC tends to do better on. But other than that, Movist has quite a few advantages over the other two.

If you have several video files in a folder that are parts of the same clip—such as movie1.avi, movie2.avi, and movie3.avi—Movist will automatically play the next one when the first one finishes. The only caveat is that they have to be named the same with number suffixes.

You can also turn the volume up to 4x the normal maximum. Quicktime is obviously stuck at 1x and VLC only goes up to 2x. This is a boon to laptop users since the smaller speakers aren't very loud to begin with.

It's a solid app and definitely worth a look.


If You Only Read One Article About The Patent System Issues

... it should be this one.

http://thisismynext.com/2011/08/11/broken-patent-system/

Wednesday, August 10, 2011

Preview Can Now Add Digital Signatures

You can now add a digital signature in Preview using your laptop camera.

View -> Show Annotations Toolbar


via TUAW



Let's Play Archive

The Let's Play Archive is a dangerous site in the same way that TVTropes.org is dangerous. It's really quite easy to lose a few hours on each of those sites.

The LP Archive is basically a collection of photos or vides of people playing through games and commenting on them. It's not a walkthrough though. It's more like MST3K with video games.

To get a feel for what it's all about, here's the LP Archive for a craptastic game that's so much more enjoyable than it was actually playing it:

Final Fantasy VII: Dirge of Cerberus by The Dark ID

Just don't say I didn't warn you.

Tuesday, August 9, 2011

iPad Gaming

A couple of years ago I bought my son a Nintendo DSi and a handful of games. It's a fun platform and we've gotten many hours of enjoyment out of it. But it looks like it's days are numbered.

My son has two chances to get a new game each year: Christmas and his birthday. So, the first year I bought it, I got maybe 3 or 4 games. At about $35 a game that's $140.

A year ago, I got an iPad.

But I get pestered every paycheck for a new app, or smurfberries, or whatever the virtual currency of his latest obsession is. $0.99 here or a $1.99 there and it doesn't seem like much. But I just checked my iTunes bill for last month and I spent about $25 in Apps and  In-App Purchases.

So, in 6 months, I will have spent more money on the App Store than a year's worth of DSi games. Actually, it's quite a bit more. Just this month I bought Final Fantasy Tactics for "my son". At $15.99. So I'm on track to spend about $35 this month in the Apple ecosystem.

This is significant.

Friday, August 5, 2011

Function Flip

Way back in 2002, CrazyBrowser released a tabbed browsing wrapper for Internet Explorer 6 and it was amazing. I loved it and used it until I switched to Mac in 2007.

I was still using dialup in those days so I'm of the generation that would open a link in the background tab to load while continuing to read the current page. As such, I hardly used the back/forward functionality and switched between tabs exclusively.

The default keys for Previous Tab and Next Tab were F2 and F3 respectively. This worked out perfectly since I'm a touch typist and have my left hand on the home keys and my right hand on the mouse.

This behaviour has since become so ingrained that I add global shortcuts on my Mac to mirror this as one of the first things I always do when setting up.

However, this necessitates setting F1, F2, et al to act as function keys in System Preferences. This wasn't so bad on my 2006 Macbook Pro since the volume keys were on the left hand side and so was the Fn key. On my new Macbook, the volume keys have been moved to the right and I can no longer hold Fn and hit the volume keys with one hand. And as we all know, changing the volume is a pretty frequent task.

And then I came across Function Flip (via Shawn Blanc).



Function Flip basically gives you the option of setting specific keys back to their default hardware functions. So I can use F1 through F9 as regular function keys and use F10 through F12 as hardware keys to change the volume without having to hold Fn.

It installs as a Preference Pane and getting up and running with it is ridiculously simple. It only does one thing, but it does it well and it's the one thing I need.

Good software should make you feel like you don't know how you lived without it. Function Flip is firmly in that category.

Thursday, August 4, 2011

Final Fantasy Tactics Released For iPhone

Must. Resist. Urge. To. Buy.

...

Too late. wheeeeee

iTunes Link

Thursday, July 28, 2011

Why do I Twitter?

http://twitter.com/shitmydadsays

That site is awesome. Seriously, go read it, and then come back.

...

Done? Good. Great stuff, right? But in and of itself, not a reason to go around stalking following people on Twitter.

Since 2001, I've been frequenting The Ozone Asylum forum on and off. On there, Jive started a thread on this in 2008, and I went ahead and signed up. But other than some tweets from Bugimus (@bugimus) on what he had planned for the weekend, there wasn't really much there to interest me. (Not that Bugs wasn't having interesting weekends back then. :) )

Fast forward to earlier this week, and someone mentions @shitmydadsays to me. So I read it, and I damn near died laughing. My endorphin hazed brain then hit on something profound, at least for me.

Twitter is really just a way to listen to interesting people. But the beauty of it is that you get to decide what's interesting.

I read Daring Fireball almost religiously, and I think I'd John Gruber would be a pretty interesting guy in real life. So I follow his Twitter stream. Simple as that.

When I'm browsing the internet, and I come across an interesting blog post where the author has a Twitter, I'll follow him for a few days. If I don't like his stream, I unfollow. Again, pretty simple.

But then, some of my friends on Facebook use it like broadcast SMS. "Hey, let's do pizza tonite. Meet at Pizza Hut."

Twitter in Plain English is good, but is a bit narrow in scope. Then again, it's hard to explain twitter to someone who doesn't already know what it is.

So, here's a quick way to get started. Sign up, find some people that interest you and start following. Don't be afraid to reply to their posts. I know a guy who tweeted Mariah Carey for a year just to get a response.

If you're from the South Pacific, it's a great way to connect with islanders from all over the world. Search for the hash tag #teampoly and start following people on there.

Short version:

  1. Follow a bunch of people
  2. Reply to the one's you find interesting
  3. There is no step 3
Enjoy.



$500 For An Ethernet Cable?!

You've got to be fucking kidding me.

http://gadgets.boingboing.net/2008/06/13/500-ethernet-cable-a.html

This is highway robbery and is aimed at naïve audiophiles. There is nothing here that a regular run of Cat6 won't do. Even the product description is bullshit:
"...signal directional markings are are provided for optimum signal transfer..."