Sublime 2 Power Tools

This is a very advanced technical article.

For years, as a developer, I used the fantastic Textmate software for writing code. I got used to it. It’s a power editor for Mac OS X and has bundle support (think of bundles as extensions or plugins) that enhance the functionality of the software) for just about every technology, from Subversion to Git to a bunch of things I don’t use in a PHP environment like C/C++ mallloc (memory allocation), Python, Ruby, etc. It’s even got a WordPress bundle!

The problem with Textmate, however, is that active development is slow. Like, extremely slow. Like, molasses slow. After five years of using version 1.5x, an alpha version of 2.0 finally emerged last year. It’s still in alpha. Pace of development is still painfully slow, and what is in the 2.0 alpha version is not ground-breaking compared to what is in the current stable version.

Along came Sublime 2. This is, by far, my favorite text editor ever. I’ve been using it for about six months. It emulates virtually everything Textmate does. Textmate does snippets (think of them as macros). Sublime 2 also does snippets and supports the Textmate style. (Hint: If you’re a WordPress developer, my favorite – and still most commonly used – snippet comes from Mark Jaquith who wrote this snippet to create WordPress widgets on the fly. It works in both Textmate and Sublime 2).

The great thing about Sublime 2 is that it is truly a hacker’s paradise. All the config files are JSON objects, so if you can write JSON, you can configure Sublime 2. None of this namby pamby UI/click/select from dropdown bulldookie. Write your code and mean it. Related is that the master configuration file is extremely well documented and you can override everything in it, not by editing this file, but by providing new values in the user configuration file.

Ok, let’s back up and get y’all up to speed on what I do when configuring my Sublime 2 environment.

Config Files

First, I recommend you look at the entire Default configuration file. Read all the settings and comments and understand all the possibilities you have. Your most comfortable environment won’t be mine. For me, I see the following configuration settings that I’m going to want to override. Keep in mind, I never edit the default configuration file. It gets overwritten on upgrade.

To access this file, go to Preferences >  Settings – Default 1.

Note that I have included the related Sublime 2 default comments along with the settings I wish to override.

// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_size": 10,

// OS X only: When files are opened from finder, or by dragging onto the
// dock icon, this controls if a new window is created or not.
"open_files_in_new_window": true,

// Characters that are considered to separate words
"word_separators": "./\\()\"':,.;-<>~!@#$%^&*|+=[]{}`~?",

// When drag_text is enabled, clicking on selected text will begin a
// drag-drop operation
"drag_text": true,

These settings and their related comments may seem self-explanatory, but in case they are not…

font_size: This setting controls the font size in the editor. Derp.

open_files_in_new_window: As a developer on an 11″ MacBook Air, I hate this setting. As the name suggests, everytime you open a file, it’s going to be in a separate window. This may be okay if you have a ton of screen real estate, but if you don’t… well, I like to have windows open up in a new tab of my editor so I can access them quickly and easily without consuming precious real estate.

word_separators: This is a list of characters that serve as word separators. I don’t mean code word separators. We’re talking about in the editor. I want to be able to click a CSS selector that often comes with a dash in the middle, and highlight/select the whole selector. By default, if there’s a hyphen, only the portion of the word clicked will be highlighted.

For instance, if a <div> has a class="foo", and I click on foo, foo will, by default, be selected. But if that div has a class="foo-bar", then clicking on foo will only highlight/select foo (up to the hyphen) and not all of the, more contextually accurate, ‘foo-bar’. In my user configuration file, I’m going to remove the hyphen, and thus remove this annoyance from my life.

drag_text: This is an edge case setting, but it has bitten me a few times. If you’re in a window in Sublime 2, and you have a block of code selected, when this default configuration is in play, you can drag that text into another window. I can see the use for this, but it’s also thrown me for a loop more times than it’s been useful. I override this to prevent that from happening. If I really want text in another window, I’ll jkust do the traditional copy and paste.

Overriding Defaults

Knowing I want to change these settings, I can write my own JSON object into my User configuration (Preferences > Settings – User):

"drag_text": false,
"font_size": 15.0,
"open_files_in_new_window": false,
"word_separators": "./\\()\"':,.;<>;~!@#$%^&*|+=[]{}`~?"

Easy Peasey!

Installing Packages

Where Textmate had Bundles, Sublime 2 has Packages. Packages are extremely powerful.

NOTE: Install this first 2. Trust me. And get familiar with this.

There are a million and one different packages out there, depending on what your needs are. Installing a package is as simple as going to Preferences > Package Manager > Install Package. Note that you can also add new external repositories of external packages that Sublime 2 can also search.

Sublime 2 - 4 Pane Grid View
Sublime 2 – 4 Pane Grid View


Sublime 2, of course, has hundreds of different setups. It kinda just depends on your taste and not being afraid to try things. Because everything is based on text file configurations and settings, everything can be reversed. Don’t be afraid to break things. You can always back out. You can even set it up so that you have multiple files open in the same tab. Set it up the way you want it and go be more productive!


  1. Sublime 2 works on Mac OS X, Windows and Linux. All options will be similar, if not identical, to what I’m providing here from an OS X perspective. If you can’t find what I’m referring to, think about where logically it might be in your menus.
  2. Specific installation instructions can be found here.

TUTORIAL: Developing Locally on WordPress with Remote Database Over SSH

Today, I went about setting up a local WordPress install for some development I am doing at work. The problem that existed is that I didn’t want to bring the database from the existing development server site into my local MySQL instance. It’s far too big. I figured this could be done via an SSH tunnel and so, I set abut trying to figure it out. The situation worked flawlessly and so, for your sake (and for myself for the future), I give you the steps.

Setting up the SSH Tunnel

I run a local MySQL server and that runs on the standard MySQL port 3306. So as these things go, I can’t bind anything else to port 3306 locally. I have to use an alternate port number. I chose 5555, but you can use whatever you want.

The command to run in a Terminal window is:

ssh -N -L 5555: -vv

A little bit about what this means.

the -N flag means that when connecting via SSH, we are not going to execute any commands. This is necessary for tunnelling as, we literally, will not execute any commands on the remote server. Therefore, we won’t get a command prompt.

the -L flag tells SSH that we are going to port forward. The following portion, 5555: combined with the -L flag means, literally, forward all traffic on localhost ( connecting on port 5555 to the remote server’s port 3306 (standard MySQL listening port).

The remote server and ssh connection is handled by This seems obvious, but just in case. You may be prompted to enter your SSH password.

The final part can be omitted, but I like to keep it there so I know what’s happening. The -vv flag tells the SSH daemon to be extra verbose about what is happening with the connection. It’s sort of a good way to debug if you need to, and to know that the port forwarding is actually taking place.

Configuring WordPress to use the Tunnel

Now that we have a successful SSH tunnel, you have to configure WordPress to use it. In the wp-config.php file, simply modify the DB_HOST constant to read:

define( 'DB_HOST', '' );

You need to add two more variables, though, to override WordPress’ existing siteurl and home options to allow you to work with the localhost domain, instead of redirecting to the that is configured in WordPress.

define( 'WP_HOME', 'http://localhost' );

define( 'WP_SITEURL', 'http://localhost' );


With these configurations in place, loading up WordPress should now load in the database content from the remote host and you can get to work on local development. Word to the wise… don’t close the terminal window with the tunnel or the tunnel will be severed. If you have to minimize it so it’s not annoying you, go for it… just don’t close it.

New York Wins Because It Has More Girls (and other tidbits of insanity from the tech community)

tumblr_m585xyxrjm1r06u14Ladies and gentlemen, we don’t live in a fantasy world where we get to define truth and memorex. There are many areas of life that are grey areas. Then there’s right and wrong, correct and incorrect, proper and improper, truth and consequences.

I had a conversation recently with a third party developer that was maintaining some code for a client. It went something like this.

Me: Hey, we’re having some problems and I noticed in the logs this error that occurs anytime we encounter the problem. I’m not sure what’s going on here, but it seems to have to do with this code. Can you look?

Him: If you turn the error reporting down, then it won’t appear in the log.

Me: I don’t think you understand. I’m not complaining about the error in the log. The error helped me pinpoint the problem area. All turning error reporting down does is prevent us from seeing the error. It doesn’t make it go away. Please tell me how you want to fix this. Thanks.

This morning, I read an article in the Wall Street Journal. The article did your now-common comparison between east coast tech – more specifically, New York Tech – and Silicon Valley tech. That conversation is exhausted. I’ve already addressed regional fiefdoms. It doesn’t matter. Us? Them? Who’s got the biggest dick? It doesn’t matter. Let’s save that conversation for another time.

The article was mostly good, besides the cliché. Until the final three paragraphs.

Andrew Rasiej, chairman of NY Tech Meetup, was debating the merits of New York versus Silicon Valley’s nearest metropolis, San Francisco, at a recent conference when a young programmer chipped in: “New York will always win out,” Mr. Rasiej recalled of the exchange, “because it has more girls.”

A table full of female models was recently enjoying a girls’ night out at Abe & Arthur’s, a steakhouse in the Meatpacking District, when a man sent one of the women a note on a cocktail napkin. It read: “”

The women posted the napkin to Facebook and crowdsourced ways they might reject the overture. In a way, it brought together avatars of the new tech scene with icons of established fashion power. But it also marked, in Internet lingo, an epic fail.

Let’s also ignore the money status cliche and address the sexism issue described in this article. I’ve done it before and I’ll continue to do it until we stop pretending that the problem doesn’t exist by simply changing the log reporting.

The tech community really likes to turn down the error reporting in a big way. New York wins out because it has more girls. Is that so?

We work, breathe, live, spend our weekends in and around, date inside of the tech world. As entrepreneurs and techies, I know more people with zero social life because their idea of fun is sitting at home at 1am on a Saturday coding a Ruby app. Maybe we are just socially unaware. Maybe we’re malicious. Maybe we’re really misogynist.

I don’t care what the excuse is. We must do better. All of us.

Having a balanced number of women to men on tech-oriented panels and at conferences is a good start, but we must fix the problem. We have to get our heads out of our asses and realize that women engineers can probably teach us something about our own world. We don’t know better. We know enough to hang ourselves.

The casual things we say to each other online or in person. The jokes we make that, to us, are jokes… are not jokes.

This is not a cry for political correctness. This is a call for sensitivity and thoughtful intent. This is a sobering call for respect and equality.

I’m talking to myself as much as am talking to you. Every time I make comments about a woman being hot, I am not simply being a man. I am disqualifying her from the intellectual marketplace that I live in. Every time I go to a meetup drinkup and I gravitate toward the woman at the bar at the same event, I marginalize her abilities as a woman in tech.

Are we supposed to just become asexual beings? No. Of course not. But there’s a time, place and way to do it and making comments like “New York wins because we have more girls,” is gross negligence. If New York wins, it’s because it has the best apps, companies, entrepreneurs and ideas… and women are partners in that.

Let’s wake up and get real and stop simply turning down the error reporting so we don’t have to address the issue.

[UPDATED] Ravens Fan and Game Watch Groups Around the Nation

I’m moving from Austin back to Baltimore today, and over the last two and a half years, I’ve been privileged to be able to participate in an incredible community of Baltimore Ravens fans deep in the heart of Texas. We’ve grown as a group to over 100 fans during peak games, while living in the shadow of the Dallas Cowboys and Houston Texans.

When I moved to Austin, I was only aware of one Ravens fan group outside of Baltimore – and that was Atlanta. I was stoked to hear about the Austin group (We call ourselves the 512 Nest) and I have watched every game with this group except when I have been at the games themselves.

With the AFC Championship game this coming week, a lot of folks around the country will be jumping on the bandwagon of the Baltimore Ravens or the New England Patriots, the Atlanta Falcons or the San Francisco 49ers.

If you’re looking to cheer on the Ravens and are looking for a group of fans in your area – whether or not you are a Ravens fan is irrelevant, as long as you want to watch with other Ravens fans – here are my currently known list of groups:

  • Austin, Texas – The 512 Nest – The Upper Decks, 301 Barton Springs Rd, Austin TX 78704
  • Los Angeles/Hollywood – The West Wing, The Parlor Hollywood, 7250 Melrose Ave, Los Angeles, CA 90046
  • Atlanta, Georgia = ATL Ravens, Sports & Recreation, 942 Peachtree St, Atlanta GA 30309
  • Houston, Texas – Houston Area Ravens Fans, Pub Fiction, 2303 Smith St, #100, Houston, TX 77006
  • Ft. Lauderdale, FL – The Florida Flock (South), Maguire’s, 535 N. Andrews Ave., Ft. Lauderdale, FL 33301
  • Ft. Lauderdale (Juno Beach) – The Florida Flock (North), Kirby’s Sports Pub and Grill, Plaza La Mar, 841 Donald Ross Rd, Juno Beach, FL 33408
  • San Francisco, CA – Ravens in the Fog, Thieves Tavern, 496 14th St, San Francisco, CA 94103
  • San Diego, CA – Dirty Birds, 4656 Mission Blvd, San Diego, CA 92109
  • Denver, CO – Baltimore Ravens in Colorado – Chopper’s Sports Grill, 80 South Madison St, Denver, CO 80209
  • Orlando, FL – Orlando Ravens Flock
  • Jacksonville, FL – Duval Bad Birds, Blackfinn American Grille, 4840 Big Island Drive #05, Jacksonville, FL 32246

I know there are more. Please let me know of any I didn’t list. Enjoy the game Sunday and GO RAVENS!

Updated: Ft. Lauderdale, San Francisco, San Diego and Denver groups added per Dave in comments. Thanks!

Update 2: Added Orlando, Jacksonville, and a second Ft. Lauderdale location thanks to the Florida Flock.

I Fired Myself

If we’re friends on Facebook or Twitter, you know about my new job in Baltimore. Technically, it’s not a new job yet, as I don’t start until February 4. However, it’s a new job and a return, for the first time since 2006, to a more corporate (if laid back) working environment. I’ve only worked for one company in that period of time, and I was a founder. That, of course, is the hugely successful WP Engine. However, I left that role in October of 2011. I still didn’t have the motivation to not work for myself.

A little about this new role, however, since I brought it up. I feel it’s necessary in proving the point I want to make.

Corporate Culture

Agora Financial, as a division of Agora, Inc. was named the 2nd best place to work in Baltimore in 2011 by the Baltimore Sun. As an adopted Austinite, that label carries a high standard. In Austin, “business casual” is cutoff jean shorts (“jorts”) and a tech swag tee shirt with sandals. In Austin, the chic commuter rides a scooter or bicycle. Maybe even walks. In Austin, drinking a beer is not something simply saved for off-hours. In fact, many companies keep a refrigerator stocked with beer because, hey, the workforce can be more relaxed, efficient and productive if given certain leeway. Thankfully, none of us are drunks… maybe.

At Agora, I found a company that matched this sort of comfort level I’ve come to expect. When I flew up for an interview (and job interviews have been something I’ve not really had to do seriously since 2002), I emailed Mark, the Art Director and my point of contact, and very politely suggested I wouldn’t be arriving at their headquarters in a tie. Manage expectations, and such. Mark’s response was simply, “That’s fine. Business casual works”.

Business casual can mean many things. It’s sort of a catch all phrase that means different things to different people based on different companies policy ideas. So I wore some decent dress pants, a button up shirt and a vest with no tie. The team had sandals, jeans with holes, and hoodies and plaid-pattern button up shirts. I felt like I was in Austin!


But company culture was just one aspect. The work they do perfectly fits who I am practically and ideologically.

You see, Agora is a publishing company first and foremost. I’m a publisher. I’ve written a book and worked with traditional book publishers. My first startup was a publishing company with, at our peak, 350 blogs. Agora’s model is different than those models, but they’re publishing. They are creating content that, hopefully, long outlives us.

They are a policy research publishing company. Those who know me know that I love policy, I hate politics. When I engage in politics, it’s usually from the lens of policy. Agora provides research analysis and white papers based on their policy research in a subscription format. So there’s also a revenue model. And they’ve been highly successful at doing this, historically through newsletters, for years. It’s a proven model, and they are a proven company.

In addition, their policy analysis generally comes from a libertarian (small “l”) perspective. As a left-leaning small-l libertarian, I enjoy this aspect of what they do (even though I suspect most of my colleagues and most libertarians as a whole are right-leaning small-l libertarians, I suspect that we all agree on a framework of responsibility and limited government in individuals life, and diverge on other less-important minutiae).

I was hungry for this job. It was a dream job for me. Join a company doing things I loved, in areas I loved, with tools (WordPress) I loved, with a style of corporate culture that I loved. When they made me an offer, I didn’t hesitate to accept and fire myself from my own company.

I fired myself!

Having the Balls to Fire Myself

Most people aspire to stop working for the man, and start working for themselves. There are entire classes at universities and colleges about entrepreneurship, and to be sure, entrepreneurship is the mode of decade.

The other night, I had the opportunity to guest lecture for an capstone course on digital entrepreneurship for American University. It was online and you can hear my story and lecture here. This course is a culmination of all the classwork done in this program and is largely a practicum of everything learned to that point. The lectures are a series of lectures from guests that give the students inspiration and motivation about their futures while they work on their individual projects.

During this talk, I spoke specifically about the time I left corporate America and went out on a limb. It was 2006. I had been working on a side-project basis for over a year building up a WordPress-powered content network and when we finally took funding, I was employee #1 or #2, depending on who you ask. I couldn’t wait to leave my computer-fixing job and go do something I really, really wanted to do instead and get paid for.

I’ve heard stories like that from hundreds of entrepreneurs. Most never look back with any regret, despite the struggles and sometime-economic instability.

I have a view that whatever I do, I do it because I want to. It’s very easy to look and say that running a startup, building a product, starting a company or, in general, working for yourself is, in fact, the holy grail.

From Happiness to Happiness

My view is that the holy grail should be happiness and motivation derived from what you do. Sometimes that means taking a more unorthodox step and saying, you know what… being an entrepreneur is awesome, but it’s a vehicle to happiness, not happiness itself.

So effective February 4, 2013, Aaron Brazell has been terminated by Aaron Brazell.

I don’t know if I would have fired myself to go be a developer in some developer-happy company that segregates the developer from the product line. In other words, a lot of developer-oriented companies have developers as a means to an end. Product managers go talk to customers, develop goals, milestones, wireframes or storyboards, make decisions on initiatives with corporate executives and the developers exist to make that shit happen.

Some people like that. Some people don’t want to be a part of the politics and roadmapping. They work better with a framework that defines what their role and deliverables are. For them, that’s happiness.

For me, happiness is seeing the vision, talking about what it means – the pros, cons, feedback – iterating, being a part of the process of both scoping and building and then allowing the idea to flourish. It means building something toward an end. In the idea of a startup, it means building a product and moving it toward acquisition, IPO or even failure.

As a consultant, there was no viable end. Unless I’m committed to building out a team (I’m not), increasing a production pipeline (without a team, I can’t), or other such motivations, a consultancy looks exactly the way it does in 10 years as it did on day 1 – find clients, build something for them, collect money, wash, rinse, repeat. There’s no glorious ending. To me, that makes for an unhappy Aaron.

Agora provides an exciting platform, an an innate sense of entrepreneurship internally, that makes me happy. If I have an idea, I can try it. If I think something could really work well, I’ve got a green light to work on it. All within a good developer situation where I also have deliverables, and things to look at and solve. The combination of such makes Aaron a very happy person.

Libertarian Drunk Braindumps

20121219-212726.jpgAt a bar. Considering a job with a libertarian organization. I claim no alignment and haven’t for a long time. However, in thinking about it, here are drunk scribbles I’ve written on the back of four napkins:

– Voted for Michael Badnarik in 2004
– Smoke weed
– Advocate of legalization
– Gun rights + Gun control
– What affects others may not be legal or best.
– Energy: can we do something to lower the cost AND save the environment?
– Can we enable the people to affect policy?
– What can we do to enable states to legalize gay marriage or amendment it?
– How can we privatize social security and still have “social security”?
– How can technology leverage common motion?
– Push notifications for local activism?
– How do we promote Justice Dept oversight of narcs without liberty infringement?
– How do we know who’s dangerous?
– Can Obamacare address mental illness?
– Does the assault weapons ban subvert the 2nd Amendment?
– This country wants a 3rd party. Can we be the force?

For Photographers, Instagram Square Photos are Worse than a TOS Update

I’m a photographer and I use both my iPhone 4S and my Digital SLR to take photos.

There’s a difference between taking pictures and taking photos, however, and the nuance is an important thing to understand. When you raise a camera and snap a photo, unless you’re paying attention to things like composition, lighting, depth of field, aperture, shutter speed and ISO, you’re taking a picture. If you’re doing all of those things (or reasonably close to all those things), you are safely in the category of “doing photography”.

One is casual. The other is intentionally art (whether good art or not is a subjective matter that shouldn’t be handled in this post).

Art doesn’t have to be Pablo Picasso or Ansel Adams or John Lennon. It doesn’t have to have a philisophical meaning or intent. Art is the expression of the Artist on an outward medium. Or in the case of photography, it is more simply the interpretation of what the eyes sees into a likeness in film or in digital media. Photography as art cannot be done haphazardly. That’s how people get caught in the trap of buying a $2000 camera and wondering why their photos suck. Because there is no context of movement, sound, smell or touch, the essence of a point in time must be captured entirely visually. If it’s done right, it’s art because care, intent and a degree of skill are needed to translate the moment into a snapshot.

Photographers work hard to get this right. It takes a perceptive eye, a knowledge of the equipment, lighting and composition to make a great piece of art in the form of a photograph.

I thought this was about Instagram?

This is about Instagram. Instagram’s app used to allow the user to upload a photo that did not fit a strict “square” format and pinch and squeeze to resize and get an entire photo in. While this was not as aesthetically pleasing as it could have been, it gave the photographer the ability to use the entirety of a photo and the composition nuances in it.

The new app does not allow for this zoom and strictly enforces a square model. The Next Web covers some of the pushback and takes the opposite side as me – that it’s high time Instagram enforce a square photo.

Take this photo as an example. I love this photo of Downtown Austin from across the S. Lamar St Bridge. The composition here is extremely important. The reflection of the bridge in the water, the trees and of course the kayaker under the bridge make this photo what it is. Here is my post-production piece.

Austin, Texas

However, what happens with Instagram? I have to scroll to one side or the other or find a happy medium in the middle for this photo.

Austin, Tx - iPhone

I realize, of course, that many users hate to see black bars across the top of the Instagram photo, as it was the day I posted my photo to Instagram!

Austin, Tx - Old InstagramHowever, this is the balancing act that Instagram has to consider. While creating a photography app for the masses, the need to keep photographers on board is essential. The new app takes away the artistic prerogative and choice from the artist and puts discretion in the hands of the masses. Last time I checked, the masses don’t shoot my photos, edit my photos, make artistic choices about my photos or have the same skills or style that I possess as an artist.

choose what my photos look like. I use Instagram to publish because it has two things: an audience and a distribution vehicle. When I post to Instagram, I push my photos to both Twitter and Facebook. I chose this even with the artistic limitations that it offered before this app update (namely the “letterbox” that goes with the photos that don’t fit into a square format).

One can argue that Instagram had to make a business decision, perhaps inline with the desires of their Facebook overlords. I guess that argument can be made. But removing artistic license abilities of artists who are using the platform is a terrible idea. Imagine if Twitter had said, back in 2007, that they had this platform that could only be used with 140 characters because it was built for use over text message and, since that was their original idea, and the colonial approach to the short message service was the only appropriate way of consumption, then text messages would be the only method of use allowed.

That is, in fact, exactly what Instagram has said indirectly, and what the Next Web article (linked above) advocates. Hey, photography used to be limited to a square format because it was the cheapest way to do it. Yeah… and then we got 35mm film which opened up a 4:3 ratio. And then we got digital that opened photographers to new technologies to create different formats, styles and use different concepts to create art.

Imagine if all our music sounded exactly the same way as the Beatles did in the 60s. Would there be any evolution to music? Of course not, because every artist would sound exactly the same way, use exactly the same cadence, write lyrics that epiphanize the exact same mindset that existed in the 60s and generally would be boring today – and I’m a big Beatles fan!

Returning to a square format is not a bad thing. There are vintage schools of thought in every format of art, fashion, music and culture. But that doesn’t mean that every artist should be forced to adopt such styles. That makes photography boring and conformist. That’s not why we do photography!