Ubuntu Icons Directory Routing

I had the weirdest problem the other day so I thought I’d write it down! I uploaded a toy script for someone, but it had images in it and they wouldn’t load. The image files existed, and I could request everything around them, files in other subdirectories were okay; the same files in other subdirectories also served correctly. Yet in my error logs I just had lots of:

File does not exist: /usr/share/apache2/icons/ ...

Which was really odd, because my webroot is somewhere else completely!

Eventually I spotted a /icons entry in the configuration for mod_alias in apache, which intercepts all requests to /icons on any virtual host, and rewrites it. Err, thanks? Renaming the directory to “images” solved the problem in this instance, and I hope if you googled for an error message, you will find this page and be able to fix it equally quickly :)

Datapoint: Weather API from the MetOffice

I’m working on a little hobby project which needs to know what the weather is going to be. I had a look around and noticed that the MetOffice had released a new API called DataPoint. They have a selection of APIs, including some map overlays and some actual weather data (more on that another day) but I was especially charmed by their text APIs – this is basically the basis of weather forecasts used everywhere :)
Continue reading

Unpacking and Editing a Chrome Extension

I’ve been having an issue with one of my chrome extensions recently – the keyboard navigation extension that I blogged about previously. This is a huge problem for me because without this extension, I can’t “click” on anything on the internet! It was working on some pages, but on others it was drawing elements but not styling them correctly. The extension doesn’t seem to be actively maintained, so I realised I was going to have to dive into the extension itself to understand the problems and have any chance of fixing it. Hurrah for open source software (not that I really write any js but I figured if I could understand the problem, maybe I could ask more intelligent questions) Continue reading

From MySQL to MailChimp via CSV

Don’t you hate disclaimers? I do, but before I do anything else, I must ask that you don’t use the techniques below unless you are emailing responsibly.

Today I needed to pull email addresses for people who had signed up to a thing out of MySQL and into MailChimp so that I could actually email them about the thing. MySQL actually has a very cute feature for exporting the results of an SQL query as a CSV file, which I had to look up to remember how to do it. It goes something like this: Continue reading

Confident Coding Report

Last week I had the pleasure of speaking at Confident Coding in San Francisco. This was a one-day event for mostly front-end developers, covering the things everyone seems to know but which seem like silly questions to ask – and it has an all-female speaker lineup.
Continue reading

Ada Lovelace Day 2012: Estelle Weyl

Happy Ada Lovelace day! Technically that’s in about half an hour as I write this in the UK but as I’m speaking at FOWA tomorrow morning, I will post this now before I get distracted. Ada Lovelace day is a day of celebrating women in science and technology, and one of the best ways to celebrate those women is to tell their stories. Every year, many woman will tell the story of a woman who has inspired them – you can find more stories on the FindingAda site.

Confident Coding: San Francisco

While I’m in the US in a week or so, I’ll be joining a stellar lineup at Confident Coding on October 20th in San Francisco. This is a by-women, for-women event to let us get together in a safe space where there are no stupid questions, and try to cover those tricks that it seems like everyone knows, but we all had to learn sometime!

Personally I’ll be speaking about git and also about SSH and things that are not FTP, and anything else I get asked about on the day. The variety of skills in the speaker lineup of this event, organised by the lovely @estellevw, is frankly imporessive and I can’t wait to meet all the speakers and attendees! I’m not often in the US at all (I’m a very reluctant traveller and I’m actually there for ZendCon the week after) so this is a rare opportunity for me.

The event is open to everyone, but if you don’t identify as female and you want to attend, please bring with you someone who does – and either way you can make use of my discount code! Simply buy a ticket, entering LORNA20 at the checkout for 20% off the ticket price.

Hope to see you there :)

PHPNW Tutorial Day

I’ve spent the last few days at PHPNW – it was amazing and inspiring and incredibly sociable from beginning to end but I wanted to share some thoughts about tutorial day in particular. For context, I delivered a full-day tutorial at PHPNW this year, entitled “PHP Tools”, containing the following topics:

  • git
  • apache virtual hosts
  • api documentation
  • static analysis tools
  • profiling with xhprof
  • deployment with phing

Somewhere along the line my attendees were unexpectedly efficient (or I was impatient) and we ended up ahead of my planned schedule, so I asked if anyone had any questions to fill the final hour or so. Continue reading

Git Cheat Sheet

Today I thought I’d share my “cheat sheet” for git – the commands that I use on a day-to-day basis. I’ve used entirely the command line tools, since those are the same on every platform. GUI tools and IDE plugins are available for git so it is worth taking a look at what is available for the development environment you use.

Checkout/Clone

In git, you don’t checkout code, you clone a repository. You end up with a local repository on your filesystem, which behaves as both the repo and as your working copy. In git, you always clone the whole repo, not a subdirectory, and the metadata is all stored at the top level, in a directory called .git.

When you are ready to clone the repo, create the directory to store it in and change into it. Then type:

git clone [url]

Here’s an example, showing a clone of my private joind.in repo on github. Continue reading

Github API Access Tokens via Curl

I’m working on some demos for a tutorial I’m giving next month and since I’d like to show off Github’s API, I needed an access token for it. They have the usual web flow but I’m cutting as many corners as I can to keep the demos nice and quick, so I looked into the support Github has for generating an API key programmatically. Continue reading