JustFiveDays.com

What I Learned Today

March 7, 2011

New site coming

Filed under: News — admin @ 7:37 pm

Since I have not posted here in a ling time, I have decided that I am going to try to do this a little more and I am going to start with an update to my website.  Hopefully it will be in the next few weeks :-)

April 24, 2009

Seasonally Rotating Style Sheets

Filed under: How To,php — Tags: — admin @ 7:36 am

There are many rotators out there that let you rotate images and other content for the most part. A while back while I was updating my sister-in-laws tree care business website, I thought that it would be cool to use different “themes” base don the time of the season. I figured this would be easy. All you needed was four different style sheets and just change them as the seasons changed.

This css rotator was inspired by css Zen Garden. The garden is a demonstration on what can be accomplished with a css based design. What I found very cool about this site is that it is only one page and you can submit your very own style sheet to display its content. Go ahead, take it for a spin. I will be here when you get back.

Now, let’s get down to business. Here is a quick outline of what we will cover:

  • The PHP script,

  • The CSS elements,

  • and , Linking the script to your page.

The PHP Script

The script is actually fairly simple. It just takes the current day in month and day format and runs that through a switch statement. I named the file “pickcss.php” and saved it in the same directory as my web page. You can copy and paste the code below and use it in your own site. I have commented what each line of the script accomplishes to help you see what I did.

<?php
$today = date("m.d"); //put todays date in a variable with only month and day
switch (True) {
case $today >= "09.21" AND $today < "12.21": //it is fall
echo "css/fall.css";
break;
case $today >= "12.21" AND $today <= "12.31" OR _
$today >= "01.01" AND $today < "03.21": //it is winter
echo "css/winter.css";
break;
case $today >= "03.21" AND $today < "06.21": //it is spring
echo "css/spring.css";
break;
case $today >= "06.21" AND $today < "09.21": //it is summer
echo "css/summer.css";
break;
}
?>

The CSS Elements

As you can see from the PHP script, I have 4 distinct style sheets that are loaded based on the time of year (fall.css, winter.css, spring.css, and summer.css). These style sheets are nearly identical with the exception of background colors, the background image in the header element and the menu element float.

Linking the script to your page

This is what makes the whole system work. Since PHP is a server side language, the switch statement is run before the page loads. You add this to the link element in the head section of your page. Below is an example:

<link rel="stylesheet" href=<?php include("pickcss.php"); ?> type="text/css" />

With the PHP script echoing the style sheet name based on the result of the switch statement, we can get a seasonal rotator.

Here is a link so you can take a look at this in action. I have set it up to change seasonally but you can click on the season in the menu to see what each style sheet looks like.  You can download the source files from here if you want to see the whole thing for yourself.

April 11, 2009

It’s Been A Long TIme

Filed under: Uncategorized — admin @ 5:41 pm

Wow! It has been months since my last entry. I guess it appears like I learn nothing. Well, I have. This entry is going to be me just rambling a bit since I have learned a ton of new things over the past few months. I m not going to be able to go through everything, but I would like to at least share with you a few of the highlights.

I guess the biggest thing that I have learned is that I am very busy. Who isn’t, right? Between work and the kids it seems that the time just fly by. These past few months have been so busy that I have even forgotten about this blog. So, the first thing I have learned during these first months of the new year is that I need to make more time for some of the things I enjoy such as spending time as a family and working on some things around the house.

The second thing I have learned is that I am way underpaid. I mean, everyone can relate to this. I currently work as a loss prevention specialist and IT guy. The company I work for tends to encourage everyone to wear multiple hats. For example, our buyers also head up production for our commercials. Our training manager is also in charge or real estate. Myself, along with loss prevention, I am the web master and general tech support for anything windows related (also Linux and Mac when needed). I am also in charge of our mail server (I just built a new one based on Zimbra but that is another post) as well as our intranet.

The reason I feel that I am underpaid is because we just relaunched our company website. Our advertising firm came up with the idea and wanted to do it for $10,000 plus annual maintenance. Stupid me did a mock-up of the site in about 2 hours because I felt that the cost was way too high. So, I opened mouth, inserted foot, and saved the company $8000 by purchasing the idea and then developing it myself.

As we quickly approach Easter, I am reminded of how Jesus died for our sins. Now, I am not an extremely religious individual although I feel there is a place for religion in anyones life, but when did we start crucifying Jesus on Palm Sunday? After asking several friends of different religions, it seems that the whole world has gone mad and started this trend. No one seems to be able to offer a great explanation, but my wife did feel it was because that most people no longer attend services on Good Friday. Good grief! The next thing you will see is celebrating Christmas in July so that those in the north do not have to deal with the snow! Oh wait, the stores are doing that already, aren’t they.

Well, I want to keep this entry short so, I will leave you with this thought from Winston Churchill: “Personally I’m always ready to learn, although I do not always like being taught.”

October 26, 2008

Mozilla Thunderbird as a Business Email Client

Filed under: Business — admin @ 5:25 pm

Mozilla Thunderbird is the open source cousin to the Mozilla Firefox web browser and is a very stable email client. At a recent conference for the company I work for, I got the opportunity to introduce this wonderful program to our management team since we were going to be making a change from Outlook Express. The main reason for this migration is the dependability and extensibility of Thunderbird. There are a ton of articles on the virtues of Thunderbird and I don’t want to repeat them. What I plan on doing is giving you some thoughts and ideas on the uses of Thunderbird in a business environment.

Mozilla Thunderbird is easy to download and setup. (Go here to get it!). Thunderbird, like most email clients, has the ability to use IMAP or POP3 email servers. In my estimation IMAP is the best type of server since you leave all of your email on the server and can access and interact with it via any platform (Windows, Linux, web, etc) and not have to deal with missing or duplicate messages. For more information about the IMAP protocol, visit http://www.imap.org/.

I prefer using an email client over web based. Thunderbird allows you to do several things to help you organize your email such as tags, saved searches, and filters. There is also an extensive add-on list to help you extend Thunderbird.

There are a few must have add-on that you should get as well. Go to https://addons.mozilla.org/en-US/thunderbird/ to get the following: Lightning, Contacts Sidebar, and Minimize to Task Bar. Of course, there are many others that can improve your experience that you can take a look at.

Lightning ExtensionLightning is a calendar add-on that is based on Mozilla Sunbird. It allows you to schedule events, create events from email messages and create trackable tasks. You can also create shared calendars that you can store on a web server that is compatible with webdav or caldav that anyone can subscribe to. There is only one caveat with this, you must watch permissions if you do not want people to inadvertently change your calendar. The best use of a shared calendar would be to allow members of group to create and maintain appointments or something similar.

The Contact Sidebar allows you to show your address book from the main window. You can double-click on any entry to create a new message. If you happen to have an LDAP server handy, Contacts Sidebar will automatically populate the listing for you. For more information about LDAP servers, visit http://www.openldap.org/.

The Minimize to Task Bar works with all of the Mozilla products and allows you to close Thunderbird down to just an icon in your task bar (typically the bottom right tool bar by your system clock). This frees up your main program bar for more programs. If you are a power user, you will find this especially helpful.

As I mentioned earlier, the beauty of Thunderbird is that it is open source and free to download and share. If you are a more portable type, Thunderbird can even be run from you USB drive. Visit http://portableapps.com for more information. You can even use all of the add-ons!

June 18, 2008

Time Management in a Nutshell or Interruptous Minimus

Filed under: Training — Tags: — admin @ 6:50 pm

It has been awhile since my last post and a lot has been going on.  Fortunately for me, I have a job that allows me to explore several areas of interest including programming, web design, training, law, and of course, what I am paid for, loss prevention.  With this eclectic mix of interests as well as my many personal interests, I find that I am learning many things all of the time.  Yesterday was no exception!

In doing prep work for some upcoming training sessions, I found the time to finally watch Randy Pausch’s Time Management lecture.   You may or may not know Randy Pausch so I invite you to listen to his story by visiting this site.  He has been featured on Oprah as well as the CBS Evening News, Time, and other media.

During his lecture he covered many of the points that all time management courses cover, organization, planning, and execution.  Even though I have learned much of this information over the years, one point that struck me was the impact that interruptions can have on your day.

The average interruption lasts between 6 – 9 minutes.  That is not bad.  However, recovery from the interruption takes 4 -5 more minutes.  Recovery might entail getting your thoughts focused back on your topic or even reacting to your interruption by completing another task or some other type of follow-up.  If you think about it, 4 – 5 interruptions during the course of one day can steal an hour or more of productivity!

Now I know, you can’t control all interruptions but you can however, minmize them.  You can start by telling the interruptor that they only have a limited amount or time or even more directly, ask them to leave.  You can also minimize the number of interruptions you might create as well.  Whlie this might sound crass, if you are sincere and honest, most people will happily work within your framework and not thiers.

There is a ton of material out there that can help you become more productive.  YouTube has Randy Pausch’s Time Management Lecture available here as well as his Last Lecture.  If you want to control your time better, start here.  He mentions two books during this lecture, The One Minute Manager (which I highly recommend) and the Seven Habits of Highly Effective People.  To paraphrase Randy, treat time like money and you will find that you are wealthy beyond your wildest dreams.

May 22, 2008

Finally…..

Filed under: News — admin @ 6:00 pm

I finally was able to merge this blog into my main site so that it looks like it belongs.  What I learned was that I need to learn php little better.  I am not using the language to its fullest potential.  For those of you that would like to merge their blog into their own website, I found a this link from Jonathan Wold’s site very helpful.

Now that I am ready to really start blogging, I will try to make an entry every fews days.  I am working on a powerpoint presentation (I would rather be using OpenOffice.org) that includes a custom video.  I am learning some tricks and will pass them on soon.