- I'm not going to lie. I was a little nervous late last night at the office... http://t.co/2tCF6RDy
This is one of the best tips if you are developer working with git on the terminal. If you are inside a directory or project managed by git, this will append the working branch your code is on to the prompt!
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
}
BOLD=$(tput bold)
RESET=$(tput sgr0)
export PS1="[\u@\h \W]\[$BOLD\]\$(parse_git_branch)\[$RESET\] $ "
The key here is, of course, the bash function created called: parse_git_branch(). Then we are modifying the default bash prompt and including the result via: $(parse_git_branch)
I do like to throw in a little color for the branch. So my actual prompt is:
export PS1="[\u@\h \W]\e[0;35m\[$BOLD\]\$(parse_git_branch)\[$RESET\]\e\[m $ "
The default prompt for bash on Mac OS X is wrong, err, different. I spend a lot of time on linux servers through terminal and like to keep things consistent. Append this to your ~/.bash_profile: to keep things in line with Red Hat:
export PS1="[\\u@\h \\W]\\$ "
If you want to get more original, here is a list of codes you can use instead:
On Mac OS X, the Terminal output isn’t colorized by default. Add the following to ~/.bash_profile:
export CLICOLOR=1 export LSCOLORS=ExFxCxDxBxegedabagacad
And uncheck “Use bold fonts” in Terminal preferences under Text. Monaco font in bold looks hideous.
While we are at it, make sure you are using the Pro settings scheme as a default. Which you use is really personal preference, but if you are a beginner, let’s start you off on the right foot with Pro.
For as long as I can remember, I’ve hated the tools out there for managing domains. Except for a brief, very happy period when I hosted my own bind servers, I’ve been using the
services of others. And they all stink. Off the top of my head I’ve used:
Inexpensive Domains was actually great until they adopted the GoDaddy interface. GoDaddy is just the suck and is one of the worst internet companies in my opinion. Moniker looks like someone outsourced the development of the tools and neither party spoke the same language. I’ve looked at many others but they aren’t worth mentioning.
I started using Gandi.net a little over two years ago. They have been good for a few reasons:
However, Gandi.net has some negatives. The management interface is very slow to load. (Not as bad as GoDaddy, though) You can’t auto renew a domain unless you pre-purchase and store funds in your account. They are in France which triggers a fraud alert every.single.time. I put my card through. The death stroke is that it takes 15 minutes for a zone file edit to get pushed to their name servers. Grrr, that one can piss you off during an application upgrade.
And then today, I found DNSimple. These guys look like they have it all. Auto renewals. International domains. Full control over DNS records (though not at the raw zone file level). And very reasonable pricing. It’s cheaper than Amazon’s DNS service. Plus they offer RapidSSL certificates. Finally, a one stop shop.
I just signed up. I’m going to give them a test and then migrate the rest Check them out: DNSimple. If you use that link, you can get 2 free months of service!
First off, I do love Groovy & Grails. We’ve built a product with it: http://bounceoff.com. And I advise any dev shop that is Java focused to stop all development and switch immediately to G&G.
However, there are dirty little things that always ruin an otherwise perfect experience. This could be a very long post, detailing all of the tiny nits I have with Groovy & Grails. It wouldn’t be fun to write and it wouldn’t be fun to read.
Instead, I can encapsulate everything that is wrong with Groovy & Grails in one quick example. <Read on…>
Before I go any further, I need to point out that the jerk-offs who come out to setup DirecTV are not employees of DirecTV. They are independent contractors who work for themselves. Hence, the above title.
If DirecTV’s business model depended on the quality of work of their installers, they would not exist. Luckily, their service is pretty good once you are up and running. I’m happy now that everything is over.
What started off as a happy move from Comcast turned into a sloppy mess. I put off writing this article because I got so pissed every time I sat down to transcribe my notes and crop pictures. Argh, even after all this time my blood pressure is rising. This install originally happened in December of 2010.
<Read on…>
These days, I often find myself at Step 1 of a very large project. How am I ever going to get it all done?
Let’s think about something different then software for a moment.
Here is my default thought process in the morning:
Alarm goes off. Groggy. I have to exercise. Think about getting up. Must exercise. Ugh, it’s so much work. I’ll just hit snooze one more time. Repeat for an hour.
Here is my new, revised thought process:
Alarm goes off. Don’t hit snooze. Just sit up. Swing feet off the bed. Stand up, put shorts on. Take a piss. Grab a shirt. Put on socks. Put on shoes. Go down stairs. Turn on the treadmill. Start running.
At each step of the process, I’m only thinking about one thing: the next item on my mental list.
Okay, now I’m putting my shoes on. I only have to put my shoes on right now. That is it. That is easy. Okay, time to go down stairs. One foot in front of the other, one step down at a time, that is it.
That process works a whole hell of a lot better than just thinking about everything I have to do. All at once. This isn’t a revelation, I’m sure. But doing it and really clearing your mind of everything except just the next step is something I found took practice.
Now, let’s jump back to software development. This is going to take 6 months and a hundred thousand lines of code. So how are we ever going to get it done?
“File > New Project…”
Included here is my presentation I gave at M3 Conf this month. There was video screen captures included in the real presentation so I’m also including a quicktime version to watch the videos, as well as the PDF.