Archive for the ‘Uncategorized’ Category

Gmail down, gmail 502, gmail black tuesday

Tuesday, September 1st, 2009

So it was bound to happen we all get so wrapped up in google’s next big beta program fall in love with it and then with out warning it’s down.

Friday we experienced outages of google calendar a new project by google to once again dominate yet another field of computers but now with gmail going down what are we to do.

Well I for one am going home, there is no work I can accomplish with out accessing my inbox… it checks every email address I have an imports it all so who am I with out an email address.

double click down, google down, facebook going down, this is bad, very, very bad….

Is it a terroist, I don’t think so probably more a faulty piece of equipment that is not allowing the routing to happen that should be.

Gmail 502, gmail not found, gmail down, microsoft (terrorists win)

PNG Transparency, IE PNG Transparency

Thursday, July 30th, 2009

This is a simple script to properly render png images in IE and standards compliant browsers. It works differently than the other png programs I’ve found out there.

Typically you use a php session and have php find and replace the png images with the extra garbage that IE needs to render transparency, it works but not that well especially when talking about background-image png’s. I’ve taken a different approach. Rather than buffering the page in a session and having the server work hard to swap everything and render the page I’ve gone with an in-line approach.

First include the file png-img.php before the head of your document, oh you have to have .htaccess override enabled so you can include php in your .html files otherwise you have to go with .php files so this php script will run.

Second when coding an image into your page; rather than the traditional <img> tag, we are going to use a php echo instead. <?php echo png_img(‘img or bkg’,’/path/to/file.png’,’width’,’height’,’border’,’IE style’,’style all browsers’,’id’,’align’);?>  so when the page is rendered it will detect the browser and write the appropriate <img> tag dependent upon the useragent of the browser. The nice thing is you can specify a different style for IE than the other browsers, also you can use it for bkg png’s, by default they are scaled, however with a simple php str_replace you can set that to whatever you want. Also since it’s simple php with html it’s easy to update with any feature you would want to add later.

PNG Image [PHP Script]

Theme Forest Turned Me Down

Thursday, July 30th, 2009

Apparently themeforest.com doesn’t want to sell my png image program… oh well, so I’m providing it to anyone that would like it here on my blog. My next post will have it attached with some instructions for use.

nothing more today

Tuesday, June 23rd, 2009

It’s my vacation!!! I don’t have to work tomorrow… but I’m sure there will be more of my tips coming up, as I try not to write blog posts on the job….

VACATION

Shell Script to add a project to your local webserver

Friday, June 12th, 2009

Just finished a fun script, basically everytime I have to create a project on my apache2 localhost (debian based linux mint 64 ) I’ve had to copy over the scripts I use all the time, my normal layout etc.. well now I’ve developed my own rapid create tool.

I’ve built a shell script that prompts for the project name, then the project home folder and based on those answers creates the directory, creates an image dir, a scripts dir with subdirectories of php and js then copies those related scripts. After copying files it then creates a template index.html with calls to the copied scripts, and the touched stylesheet.

Once the script is done copying and creating files, it then adds the new address to my /etc/hosts file and creates an /etc/apache2/sites-available/host.rob file ( all my local addresses are .rob instead of .com ) and then makes the symbolic link to sites-enabled and finally restarts my webserver.

Here is the script

#!/bin/sh

tempp=”/var/www/template”

echo “Project Name:”
read pname

echo “Project Home Dir: (/var/www/) no spaces ”
read ppath

mkdir /var/www/$ppath
mkdir /var/www/$ppath/scripts
mkdir /var/www/$ppath/scripts/js
mkdir /var/www/$ppath/scripts/js/jquery
mkdir /var/www/$ppath/scripts/php
mkdir /var/www/$ppath/scripts/php/php_mailer
mkdir /var/www/$ppath/images
mkdir /var/www/$ppath/bak

cp $tempp/jquery.js /var/www/$ppath/scripts/js/jquery
cp $tempp/email.js /var/www/$ppath/scripts/js
cp -r $tempp/php_mailer/* /var/www/$ppath/scripts/php/php_mailer
cp $tempp/index.html /var/www/$ppath/
cp $tempp/styles.css /var/www/$ppath/
cp $tempp/sendmail.php /var/www/$ppath
cp $tempp/.htaccess /var/www/$ppath
cp $tempp/png-img.php /var/www/$ppath/scripts/php

echo “Root Password\a”
su -c “echo Running as root”

echo “127.0.1.1 $ppath.rob” | sudo tee -a /etc/hosts
echo “127.0.1.1 www.$ppath.rob” | sudo tee -a /etc/hosts

touch /etc/apache2/sites-available/$ppath.rob

echo “<VirtualHost *:80>” | sudo tee -a /etc/apache2/sites-available/$ppath.rob
echo ” ServerAdmin rob@robertsandusky.com” | sudo tee -a /etc/apache2/sites-available/$ppath.rob
echo ” ServerName $ppath.rob” | sudo tee -a /etc/apache2/sites-available/$ppath.rob
echo ” ServerAlias www.$ppath.rob” | sudo tee -a /etc/apache2/sites-available/$ppath.rob
echo ” DocumentRoot /var/www/$ppath” | sudo tee -a /etc/apache2/sites-available/$ppath.rob
echo “</VirtualHost>” | sudo tee -a /etc/apache2/sites-available/$ppath.rob

sudo ln -s /etc/apache2/sites-available/$ppath.rob /etc/apache2/sites-enabled/

sudo /etc/init.d/apache2 restart

echo “Project $pname has been created succesfully visit $ppath.rob to begin”

Switch from IE 6

Thursday, June 11th, 2009

Today I’m starting a new site, http://www.switchfromie6.com it’s dedicated to making a simple site that every one can link to and have everything explained about why to upgrade and how. We will be adding a javascript library file to provide everything necessary to shadow box your page and hover our upgrade notice.

Check switchfromie6.com soon to see what we’re talking about.

last update

Thursday, May 28th, 2009

you need to change the pet-transportation.jpg in the media/catalog/catagory folder

Magento Order Confirmation

Wednesday, May 27th, 2009

Another magento update on that site.

Change ‘Edit Your Cart’ to ‘Edit Your Shopping Bag’ in /app/design/frontend/default/default/template/checkout/onepage/review.phtml

Magento Sizing Chart

Tuesday, May 26th, 2009

You need to update the individual product descriptions for all pet apparel with the style that Extreme All-Weather boots has, it’s uses an image link to trigger a popup page with the sizing chart. With the sizing chart I set it up as a static block so I could call the block.

more magento

Tuesday, May 26th, 2009

had to update name in admin to global scope to properly sort by name