By Phil Frilling, 2 August, 2013

I find myself searching for these commands more often than I should. So, until my mush brain remembers these I'll write them down here.

Archive a directory

tar -zcvf .tar.gz /DIR/You/WANT/TO/ARCHIVE 

Extract .tar.gz file

By Phil Frilling, 18 July, 2013
Today we needed to override the menu links of one menu on our Drupal 7 site. We started with theme_menu_links(), but quickly decided that we didn't want to figure out what menu every menu link belonged to. After some searching we discovered this comment (https://api.drupal.org/comment/26939#comment-26939) which suggested using this naming structure: THEMENAME_menu_link__MENU_NAME() Sure enough, once this function was placed in our theme, the exact menu was targeted and we didn't have to wade through every menu item.
By Phil Frilling, 10 July, 2013
Today I needed to embed a YouTube video within the body of a responsive design. This is usually fairly easy with images, but iFrames need a bit of extra love to make them work. I Googled for a while and came across this link: http://stackoverflow.com/a/12121929. I didn't want to use an image, so I followed the comments and came up with the following code.
By Phil Frilling, 20 March, 2013
Today I learned a lesson the hard way: never stop networking when your only access to a server is via ssh.

What happened

One of the websites we were hosting stopped responding on its dedicated IP address. As we began to investigate, we found nothing wrong with the server load, nothing wrong with the apache configuration. We were using aegir, and re-verified the site and everything was successful. Next, we typed the dedicated IP into the browser and the browser just spun.
By Phil Frilling, 27 November, 2012
Recently I needed to have a dynamically changing background image for a Drupal 7 theme I was working on. Allowing the user to change this background image directly from theme's settings page.

How to add a dynamic background image to a Drupal theme

  1. The first step is to add a file named 'theme-settings.php' to your theme.
  2. Next, we need to add our background image form.