Developing software in the Real World

Some notes on git

This set of notes covers the main things that I think you need to know about working with git. It is not comprehensive and mainly serves as a reminder for myself. Remotes In a typical open source workflow using GitHub or BitBucket, you would fork the main repository into your own and then clone that copy to your local computer:

You then need to connect your local repository to the main repository. By convention,… continue reading.

Git export from BitBucket

One of the consequences of moving to git is that I needed to get our deployment scripts working with it. The first requirement was an equivalent to svn export. This is simple enough, but, as usual, I wanted to save myself some effort and created a script that wrapped it up for me. git-export.sh:

Not the most complicated script in the world, but I never need to think about it again and it's easy… continue reading.

Migrating to BitBucket from Subversion

I've recently started the process of moving all of my Subversion repositories to BitBucket. BitBucket is my preferred git hosting supplier as its pricing structure suits me much better; that is, I have lots of private repositories and GitHub is too expensive for my case! As I needed to migrate over one hundred repositories from Subversion to BitBucket, I automated it via a simple shell script. Rather usefully, BitBucket has an API that let me… continue reading.

Preparing for the ZF2 Tutorial at PHPNW12

If you are coming to the ZF2 tutorial at PHPNW12, then you will get the best out of it if you do a little preparation before you arrive. Laptop You should bring a laptop with the following working on it: A web server (preferably Apache) running PHP 5.3.3 or higher A working MySQL server along with an administration tool such as phpMyAdmin A text editor or IDE that you're comfortable coding with Vhost set up… continue reading.

Introducing Avalance: A landslide presentations theme

Evan and I are giving a joint Zend Framework 2 tutorial at the PHPNW12 and ZendCon conferences this year and, consequently, we needed a way to create the presentation collaboratively, ideally using a text based system which we could store in git. There are plenty of HTML5/JS based solutions out there and we decided on landslide which is a python based markdown -> HTML presentation system. However, I really didn't like any of the default… continue reading.

Setting up PHP & MySQL on OS X 10.8 Mountain Lion

There is a Serbo-Croatian translation of this article kindly provided by Anja Skrba: Podešavanje PHP i MySQL na OS X 10.8 With OS X 10.8, Apple continues to ship PHP 5.3 with Xdebug, PEAR, GD and PDO_MYSQL. This is how to set it up from a clean install of 10.8. /usr/local Ensure that the following directories exist:

MySQL Download the "x86, 64bit" DMG version of MySQL 5.5.x for OS X 10.6 from mysql.com and… continue reading.

Automatic Apache vhosts

One thing that I've wanted to implement for a while now is automatic vhosts on my dev box. The idea is that I want to drop a folder into a directory and have it automatically turned into a vhost for me accessible at http://foldername.dev. It turns out that this isn't nearly as hard as expected which is usually the case with things that I've been putting off! This is how to do it. Apache configuration… continue reading.

OS X Tips and Tricks

It's been around 18 months since I wrote up some notes about OS X, so clearly it's time for an updated article. This article is intended to give a quick and easy introduction to some key things that I think you should know when you move to using OS X. Basics There's one menu bar for all applications. That is, you can only see the menus for the currently active application. Closing the last window… continue reading.

OS X Tips and Tricks for Snow Leopard

Following some discussions with friends who've recently started using OS X, I thought I'd note down some tips and tricks that I've learnt since I moved to Mac. This is in no particular order as it's taken from IRC logs of conversations I've had :) Basics There's one menu bar for all application Closing the last window doesn't exit the application. Use cmd+q or the Quit menu item on the "application name" menu. System Preferences… continue reading.

Changing OS X Terminal colours when ssh'ing into a server

I recently discovered that iTerm has bookmarks so you can set up a bookmark to ssh into a server and change the colours of the window. This makes it easy to remember which terminal window is for which server. Thinking about it, I wondered if you could change the colours of the standard OS X Terminal via AppleScript. Inpired by Red Sweater's Random Color Terminal post, I wrote some code to automatically change the Terminal… continue reading.