Category Archives: Coding

Coding

There’s no need to type your password when you restart Apache, really…

When you're developing with PHP on a mac, if you're not using MAMP, you'll often end up having to do a lot of manual restarts when you make changes to how you've set up Apache (assuming you haven't joined all the cool kids and moved onto Nginx yet...). This usually involves calling up a terminal [...]
Also posted in sysadmin | Tagged , | Leave a comment

How to get back into Drupal site if you’ve locked yourself out

A few posts back, I shared a one liner to get you back into a WordPress site if you manage to lock yourself out, and forget your database password. Assuming you've access to the command line and drush, you can pull a similar trick with Drupal, by typing the following query in: drush sql-query "update [...]
Posted in Coding | Tagged , | Leave a comment

Quick heads up on a super handy cheat sheet for Drupal

I'm working with Drupal a lot at work now, and in the process of creating my last post, I stumbled across this cheat sheet for developing with Drupal. I had no idea could pull ddebug_backtrace() to get an instant stacktrace, or DARGS() to see the arguments being passing into a function at any point, or [...]
Also posted in Journal | Tagged , , | Leave a comment

How to setup Snow Leopard for LAMP development and debugging

Over this weekend, I've been looking at ways to make it easier for me to work with PHP, largely because I've been using it more and more at work, and I've felt spoilt by the tools available when using Ruby, like the [ruby debugger], or when playing with Django or Twisted, python's own interactive pdb [...]
Also posted in Journal | Tagged | Leave a comment

Looking for the best way to keep data on servers safe

We know we should all be doing it, but most of us don't do it enough. I put out a request today to my followers Twitter asking this question: I've had the following services recommended to me by a number of fellow developers whose opinions I have a lot of respect for: A couple of [...]
Also posted in sysadmin | Tagged , , | 1 Comment

The quickest way into WordPress when you’re locked out.

I love WordPress as a platform for building sites. But no matter how many times I see it, I don't think I'll ever get used to having this snippet available to me if I get locked out of a WordPress install : <?php wp_set_password('new_admin_password',1); // this changes the password for user with an id of [...]
Also posted in meta, security, sysadmin, wordpress | Tagged , | Leave a comment

Nerdy Vim tip ahoy! How to save a file as the root user from inside Vim

At work, I'm always managing files while working on a remote server which invariably means I'm stuck using Vim or Vi, and finding out after I've made the my necessary changes to crucial config file, I don't have the rights to actually save them - so I can see this tip by catonmat saving lots [...]
Also posted in sysadmin | Tagged | 2 Comments

The ForkBomb Tattoo

This doesn't count for much, but I think this is one of the cleverest, geekiest, most elegant tattoos I've ever seen. Carving an Apple, Cisco or Nike Logo onto your body? That's really quite sad. But this is something different: Why do I like it? I think it's about as attractive as a code type [...]
Also posted in Journal, sysadmin | Tagged , , , , | Leave a comment

RVM and Textmate in harmony

One side effect of Ruby's popularity is the proliferation of ruby interpreters that can now execute ruby code, which is generally seen as a good thing, as a sign of a healthy community. However, keeping track of all these versions of Ruby, especially when testing gets harder as each new version of Ruby is released, [...]
Posted in Coding | 2 Comments

Tar is not zip

Today, I had to package up some code that was residing on a remote server that I had ssh access to, to send to someone who was probably on a windows box. This meant I had to use the zip tool, which I can never remember how to use, hence this memory jogging post. Now [...]
Also posted in Journal | Tagged , , , , | Leave a comment