ThingyMaJig

Thingy Ma Jig is the blog of Nicholas Thompson and contains any useful tips, sites and general blog-stuff which are considered interesting or handy!

Connect

LinkedIn GitHub

Topics

announcement 25 apache 3 Apple 1 bash 8 code 7 cool 30 Days Out 8 Dark Basic Pro 4 design 12 doctor who 1 Drupal 74 E4600 1 EOS 400D 3 firefox 2 Flickr 3 free 21 games 5 geek 38 git 2 GreaseMonkey 1 hardware 7 Homebrew 1 How to 37 humour 5 iphone 1 javascript 1 jquery 1 K800i 6 k850i 4 lighttpd 3 linux 33 mac 9 miscellaneous 4 mobile phone 9 music 4 mysql 8 n73 1 n95 1 New Relic 1 Ogre3D 1 OS X 2 performance 3 photos 10 programming 40 Quicksilver 1 review 19 security 3 SEO 6 software 12 svn 2 technology 4 tip 7 tips 10 tv 3 video 3 vim 7 webdev 2 websites 33 wii 1 windows 1 YADS 10

Thingy Ma Jig

Git: How to run a command on a specific folder

15 October 2012
git How to tips

I recently needed to be able to run a regular git task on a folder and I didn't want to have to CD into that folder first. Annoyingly, there didn't seem to be an optional "path" parameter to git remote update, until I looked at the help file for Git.

How to run Drush as Apache

10 August 2012
Drupal linux

It's usually considered best practice to run Drush under the same user account that the webserver runs on. Some modules, such as XML Sitemap, Advanced Aggregator and cTools, often try to alter or generate files. If you run Drush under your own account then these files may get generated as you (and therefore become unwritable by the webserver) or, if the files were generated by the webserver, are usually unwritable by your user which can mean you get errors and being unable to delete/unlink files.

Forcing New Relic into Kiosk Mode

09 March 2012
Drupal New Relic GreaseMonkey

New Relic is a great bit of kit - nobody can deny that. I recently needed to configure it on a standalone box so it could be open on a large screen so my colleagues and I could see the current status of our sites. New Relic has a Kiosk Mode which strips out some of the navigation from the page an optimises it for "viewing only". Very handy.

Exporting a Git Repository

15 December 2011
Drupal git webdev

Have you ever needed or wanted to pull a remote Git Repository on Drupal.org down as a zip or tarball? You know, the way Github does? Most project releases have fairly recently built tarballs which is awesome - but Sandboxes do not (so it seems - please correct me if I'm wrong!).

The following snippet lets you "archive" a remote repository, pull it down as a tarball, and extract it in-place:

git archive --format=tar --prefix=PROJECT/ --remote=USERNAME@git.drupal.org:sandbox/USERNAME/123456789.git BRANCH | tar -xf -

Quick Tip: Drupal Hook Commenting Using Vim

14 November 2011
vim Drupal programming

According to the Drupal Coding Standards for Documenting Hook Implementations, its considered a good practice to quickly chuck a comment before any function which implements a Drupal hook (eg, hook_menu). This helps someone reading your code quickly see that the function is actually linked with a hook in Drupal and isn't just a function in your module to be called directly.

But… Well… The thing is… Does anyone else get bored of writing the following over and over again? I know do…