Blog posts by Duncan Stuart

  • Quick Tip – disable WordPress login during development

    When you’re developing a WordPress site locally it can be tedious to keep logging in with a fake username and password – particularly if you’re testing things out from the perspective of multiple user types (e.g. Admin and Subscriber) or using an existing database. Fortunately there’s a quick hack which makes lets you skip WordPress’ […]

  • Ruby-on-rails: deleting all data from a table

    During development, you might find yourself needing to delete everything from a specific database table to refresh your data. You could drop the whole database and bring it back up again with rake:db:drop, rake:db:setup, but that’s slow and indiscriminate. Instead, boot up a console and call delete_all on your model: I’ve been using this quite […]