ACTIONSCRIPT STRAIGHT FROM OUR FACTORY FLOOR TO YOUR MONITOR OF CHOICE


SUGAR PILL FACTORY IMAGE

February 7th, 2010-Sunday
SUGAR PILL FACTORY IMAGE

Add Thumbnail Previews to Wordpress Blog Posts


SUGAR PILL FACTORY IMAGE

SUGAR PILL FACTORY IMAGE

This is an inline statement (hack) that will call up the first image in your post.  You can do whatever you want with it once its in your html ;)

<?php
preg_match_all('/<img[^>]+>/i',$post->post_content, $result);
$pic=$result[0];
echo $pic[0];
?>

(It must be within the post “loop”)

-J

SUGAR PILL FACTORY IMAGE SUGAR PILL FACTORY IMAGE
Digg! Digg this submit to reddit Stumble it!


SUGAR PILL FACTORY IMAGE

February 4th, 2010-Thursday
SUGAR PILL FACTORY IMAGE

Hewlett-Packard, You Can Kiss My Butt. You Build Crap Machines and You Know It.


SUGAR PILL FACTORY IMAGE

SUGAR PILL FACTORY IMAGE

I shelled out $900 a year and a half ago for an HP Dv9000.  The guy at Best Buy assured me it was a fast, reliable machine.  Well, three months into owning it I noticed that my battery was losing its ability to hold a charge exponentially.  The longer I kept it plugged in, the less charge it would hold.  I remember taking a road trip with my laptop wired to the cigarette lighter of the car the whole damn time because if I disconnected it for more than five minutes my computer would die.  That was problem one.

Problem two was I couldn’t even let it sit on my lap for fear of burning the hair off of my legs or the computer shutting down due to overheating.  Um, it’s called a fucking laptop, not rest it on top of a refrigerated surface so it will work for more than 10 minutes top.

Problem three.  Because I constantly had to have the thing plugged in, the power jack soon began to falter.  Now, in order to use my $900 piece of crap I had to have it on top of a cool surface with the power cord wrapped back underneath it so that there was a little pressure on the jack area.

Problem four.  One night, after downloading an “important Vista update”  my computer just shut off completely.  ??? I turn it back on.  Kernel error?  WTF?  So I run the bios diagnostics.  Memory OK, Hard drive BAD.  Ok, I can deal with that, hard drives go bad.  Fortunately I never kept anything important on this machine (knowing it would give out on me soon).  So I go back to Best Buy, carrying the drive that failed me.  I ask the service guy in the computers department which would be the preferred replacement for the drive in my hand.  He shrugged his shoulders and pointed me to the “Geek Squad”  So, I walk over, stand in line for 45 minutes and overhear horror stories from the geeks about HP and how every other computer they service IS an HP.  Finally it’s my turn at the front of the line.  I ask the geek squad guy “Where can I find a replacement one of these?” while holding up the drive.

“Right there” he says pointing, “next to the sales attendant.”

Well, screw this, I ordered one online for half the price.  I wait a week for my drive to arrive.

Drive arrives.  Yay!  Let’s install this!  Ok! Installed! Now, let’s install… oh wait… no disks!  HP doesn’t even give you a recovery disk for their crap computer that will most DEFINITELY need to be recovery-ied! So, I download a demo version of windows 7.  Install.  Bad Install.  Wha?? Retry… bad Kernel… WHA??!? Fuck it.  I let the computer sit on my bookshelf for a month.  I don’t even care anymore.

Problem five.  I need Windows.  As  much as I hate that operating system, I need it to check my sites in IE.  Ok, let’s figure this damn box out.  I remove the memory and BAM it starts right up.  Amazing.  Fucking amazing.  So, I have it running, always plugged in, with no battery, no ram and a crack demo version of Windows just so I can see my sites on the crappiest monitor possible. This works great for… 2 weeks?

Problem six.

HP DV9000 Blue Screen of Death

Fuck you HP.

-J

SUGAR PILL FACTORY IMAGE SUGAR PILL FACTORY IMAGE
Digg! Digg this submit to reddit Stumble it!


SUGAR PILL FACTORY IMAGE

February 2nd, 2010-Tuesday
SUGAR PILL FACTORY IMAGE

Linky-Dinky Tuesday


SUGAR PILL FACTORY IMAGE

SUGAR PILL FACTORY IMAGE

A CSS Coke Can. Pretty neat.

My all time favorite debt story.

Think the iPad is the first attempt? Here are a couple of its predecessors that never got off the ground.

Goodbye Howard Zinn.  Thank you for your work.

Study your languages!

My kind of php guy.

jQuery is big, folks. Real big.  Learn to use it.

A work of art.

Awesome article to shove down your managers throat.

SUGAR PILL FACTORY IMAGE SUGAR PILL FACTORY IMAGE
Digg! Digg this submit to reddit Stumble it!


SUGAR PILL FACTORY IMAGE

January 31st, 2010-Sunday
SUGAR PILL FACTORY IMAGE

Apparently Our Visitors Dislike IE Too.


SUGAR PILL FACTORY IMAGE

SUGAR PILL FACTORY IMAGE

Gotta be stoked when the majority of your traffic is NOT Internet Explorer.

-J

SUGAR PILL FACTORY IMAGE SUGAR PILL FACTORY IMAGE
Digg! Digg this submit to reddit Stumble it!


SUGAR PILL FACTORY IMAGE

January 29th, 2010-Friday
SUGAR PILL FACTORY IMAGE

How I Make Sure I Get Paid


SUGAR PILL FACTORY IMAGE

SUGAR PILL FACTORY IMAGE

If you’re a freelancer like me, jobs come in on the fly. One week I’m destitute and the next I can’t find a free second in my day to let my dog outside. Personally, I prefer this lifestyle, I like to think of it as hunter/gatherer like. That along with my beard and unkempt hair and I’m a regular natuarlite!

Anyway, being that it’s just me vs. the client in the “fork over the money” department, I often find myself waiting on payments for an inexplicably long time, which makes my bank account unhappy, which makes my bill collectors unhappy, which makes me unhappy, which makes my girlfriend unhappy etc… SO, to remedy, I’ve decided to implement doomsday clocks on all of my clients websites.

In the header of index.php file on my clients site I include my little script:

require_once 'goodClientCheck.php';

—goodClientCheck.php —

<?php
if(isset($_GET['callOff'])){
$handle = fopen('goodClientCheck.php', 'w');
fwrite($handle, '<?php $overDue = 0; echo "The Client Came Clean"; ?>');
$overDue = 1;
echo "The Client Came Clean";
}else{
date_default_timezone_set('utc');
$exp_date = "2010-01-27"; // this is your expiration date.
$todays_date = date("Y-m-d");
$today = strtotime($todays_date);
$expiration_date = strtotime($exp_date);
if ($expiration_date > $today) {
$overDue = 0;
} else {
$overDue = 1;
}
?>
<script type="text/javascript">
checkDate();
function checkDate()
{
<?php if(!$overDue){
echo "alert('You Are A Good Client');";
}else{
echo "window.location = 'countDown.html';";
}?>
}
</script>
<?php } ?>

This script checks today’s date against my target “warning” date. If the warning date has passed I set a variable called $overDue to true. If $overDue is true, I insert in the head a little bit of javascript that will direct the user to my “countDown.html” page that contains a count down and a button for the option to pay…

<script type="text/javascript"?>
function doPayFunction()
{
alert("bout time you came clean!");
}
</script?>'



Now if the time in the .swf reaches zero, it sends a secret code to removeAll.php that will rewrite the index page.

– removeAll.php–
<?php
if($_GET['key'] == ’secret flash key’){
$handle = fopen(‘index.html’, ‘w’);
fwrite($handle ‘you are a bad client’);
}

If the client HAS payed, and all is ok, all I’ve got to do (if you hadn’t noticed in the top script) is visit the goodClientCheck.php page and send a true value to the parameter callOff in the URL like goodClientCheck.php?callOff=1 and the goodClientCheck.php page erases itself.

You could make this more automated of course. Or you could not use it at all and avoid the risk of heavy lawsuits. I just thought it would be fun to put something like this together.

To all my current clients… “Pay Up!” To all prospective clients… Don’t worry, I’d never REALLY do something like this ;)

Source Code Here

-J

SUGAR PILL FACTORY IMAGE SUGAR PILL FACTORY IMAGE
Digg! Digg this submit to reddit Stumble it!