Note: This article assumes that you have SSH access to a LAMP installation and are familiar or comfortable using the command line.
The command line is a tool that self taught developers often spend much energy avoiding as they first start to learn server side and database languages such as MySQL and PHP. At first I was extremely intimidated by the Terminal window and skipped out on a lot of tutorials that told me to log into my server via SSH, based only on the SSH factor.
As I started to get more comfortable with the basics of the PHP and MySQL, I also became more interested in harnessing the power of the command line and learning how these things depend on a greater stack of code.
I started out with a few simple VIM editor commands, editing php.ini and .htaccess files directly on the server. Once I started to branch out a little more I found out that instead of downloading large frameworks such as Drupal or ZendFramework and then having to upload them back onto the server (which can often take 30-60 minutes), I could do a quick wget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz followed by a quick tar -xvzf drupal-6.4.tar.gz. Bam! There it is no waiting, no download and upload.
TAR a file/folder(Foldername: drupal)
Example: tar cvf .tar
Usage: tar cvf drupal.tar drupal/
UNTAR a file/folder(Foldername: drupal)
Example: tar xvf .tar
Usage: tar xvf drupal.tar
GZIP a file/folder(Foldername: drupal.tar)
Example: gzip
Usage: gzip drupal.tar
UNTAR & UNGZIP
tar -xvzf
– Joshua
No Comments
Switch Creative is a Memphis based graphics studio sporting a fantastic identity and poster collection. I have a soft spot for posters, as I’ve said in the past. What really hooked me with Switch’s collection of posters is the non-standard sizing of their work. The Of Montreal poster, with the red maples leaves on a velvet black background look amazing. However, my favorite of the collection was the Don Caballero poster with the necktie and pinstripes.
Visit Switch Creative

– Joshua
No Comments
I’ve been toiling over the course of the week with a date problem in an email subscription list for a client.
Scenario:
I would like for any site user to have the ability to subscribe to any taxonomy of the site and receive an email based on the users personal preference of frequency. They would have the option to receive an instant update everytime a post is made to their subscribed-to taxonomy(s) or they could receive the digest email daily, weekly or monthly. Lastly, I would like to be able to control when the daily, weekly or monthly emails are sent. I would like to be able to choose the week of the month (if applicable), day (if applicable), hour, and minute (quarter hours).
Everything is pretty straight-forward and pretty generic as far as email management or “ListServ” style solutions go. My only hang up has been figuring out which is the first Tuesday or the second Wednesday or the fourth Friday of the month.
After much searching and hours of trial and error I came acrossed this post which gave the below solution. It takes the current day and returns which week of the month it is in.
<?php
/**
* A brilliant one-liner, considering most of the solutions I've seen have been a minimum of 10-20 lines of code.
*/
$week = date('W') - date('W',strtotime(date('Y-m-01'))) + 1;
/**
* While the line above is short and to the point, the code below is a verbose example of how one could utilize the one-liner in a real world situation.
*/
class WeekNumber {
private $DateString, $Day, $DayName, $MonthName, $Number, $Week;
/**
* Adds a suffix to a number (1-5)
*
* @return $DateString
*/
final function Display() {
$DayName = date('l');
$MonthName = date('F');
$DateString = "Today is the " . $this->_get_week_number() . " " . $DayName . " in " . $MonthName;
return $DateString;
}
/**
* Adds a suffix to a number (1-5)
*
* @return $Day
*/
private function _add_suffix($Number) {
switch($Number) {
case "1":
$Day = "1st";
break;
case "2":
$Day = "2nd";
break;
case "3":
$Day = "3rd";
break;
case "4":
$Day = "4th";
break;
case "5":
$Day = "5th";
break;
}
return $Day;
}
/**
* Return the week number of the current week day
*
* @return $Week
*/
private function _get_week_number() {
/** Here's our one liner **/
$Week = date('W') - date('W',strtotime(date('Y-m-01'))) + 1;
$Week = $this->_add_suffix($Week);
return $Week;
}
}
$WeekNumber = new WeekNumber();
print $WeekNumber->Display();
?>
– Joshua
No Comments
Screen printed posters are my design weakness. I can’t help to be drawn in by them…that was one of my primary sources of interest when design was still new to me.
– Joshua
No Comments
Happening Worldwide September 5-7.
Check it out.
– Joshua
No Comments
I was looking for sites that utilized the Javascript History/BackButton library SWFAddress, because the studio I work at was looking into similar solutions for a site we were working on EcoDrivingUSA. While searching I noticed that The Heads of State used it and had just released their newest web site redesign.
I’ve been a fan of The Heads of State since I saw there first entires PRINT and HOW. If you’re unfamiliar with them they’re an amazing two man studio formed by Jason Kernevich and Dustin Summers with offices in Brooklyn, NY and Seattle, WA that is probably best known for their poster work.
– Joshua
No Comments
I’m so excited I just received an email from Panic. Coda 1.5 is now avaiable! YES!
Let’s do a quick feature run-down:
- With the new version comes an amazing update that our Textmate-using, rival, developer friends have had for some time now. “Fully integrated source control with Subversion.”
- Mixed-mode syntax highlighting (Javascript embedded in HTML)
- Significant performance increases (Leopard only)
- Search across multiple files locally
- User customizable books
- More AppleScript support
- Web Preview now previews local PHP files
– Joshua
No Comments