Sanitize Your Data Inputs (Comic)
April 14th, 2008
There have been a lot of people asking how they can keep their GSA synced. Here is quick, simple, and easily configurable solution that should help. Set this up as a CRON job and you’re done.
Requires: PHP, cURL
<?php
/**
* @author Chris Williams ctwilliams[at]gmail[dot]com
* @version 0.0.1
* @example php gsa-sync.php
*/
define(‘GSA_PATH’, ‘http://gsa.xyz.com:8000′); // Replace ‘http://…’ with your gsa host and port
define(‘GSA_USERNAME’, ‘user’); // Replace ‘user’ with your username
define(‘GSA_PASSWORD’, ’secret’); // Replace ‘password’ with your password
/** Define DB collections */
$dbSources = array(‘dbcollection1′, ‘dbcollection2′);
/** Go to log in prompt */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, GSA_PATH . ‘/EnterpriseController’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_COOKIEJAR, dirname(__FILE__).‘/cookie.txt’);
curl_exec($ch);
/** Authenticate */
curl_setopt($ch, CURLOPT_URL, GSA_PATH . ‘/EnterpriseController’);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,‘actionType=authenticateUser&userName=’ . GSA_USERNAME . ‘&password=’ . GSA_PASSWORD);
curl_exec($ch);
/** Loop through and trigger db sync for each collection in $dbSources */
if(is_array($dbSources)) {
foreach($dbSources as $source) {
curl_setopt($ch, CURLOPT_URL, GSA_PATH . ‘/EnterpriseController?actionType=syncDatabase&entryName=’ . $source);
curl_setopt($ch, CURLOPT_POST, false);
curl_exec($ch);
}
}
/** Close cURL connection */
curl_close($ch);
?>
Feedback and suggestions are appreciated… Enjoy!
First off let me begin by saying I have not read this book. However by first impression why would anyone want to?

Seriously… what is that on the cover? A Microsoft FrontPage disc?
Side note: While taking this picture at Barnes & Noble - one of their excellent employees didn’t like me taking a snapshot but offered to ring me up or provide me with more information about this book. Tempting!
After watching a few seminars from last years Web Design World 2007 in Seattle I was very impressed after watching Interface Design and CSS Workshop presented by Cameron Mall. Last month I began development on a new site. With one month of development time allocated for coding, design, and image slicing, there wasn’t any time to sit around. I wasn’t too worried about coding but I design had never been my primary focus at work. Since this project required intensive design work that was both cross-browser compatible and 508 compliant. Allowing users to view a site at a wide range of screen resolution, font sizes, web browsers, and color-depths the solid CSS is a must. I expressed ordered to design books to serve as a reference through development and design. Immediately after the books arrived I got hooked. I sat down and read cover-to-cover of both books within a week. The organization of these books and information presented proved to be an invaluable resource in the construction of my latest project. I would highly recommend professional web developers / designers, freelancers, and hobbyists alike to pick up a copy of both of these books.
“I’m a modern man, a man for the millennium. Digital and smoke free. A diversified multi-cultural, post-modern deconstruction that is anatomically and ecologically incorrect. I’ve been up linked and downloaded, I’ve been inputted and outsourced, I know the upside of downsizing, I know the downside of upgrading. I’m a high-tech low-life. A cutting edge, state-of-the-art bi-coastal multi-tasker and I can give you a gigabyte in a nanosecond!
I’m new wave, but I’m old school and my inner child is outward bound. I’m a hot-wired, heat seeking, warm-hearted cool customer, voice activated and bio-degradable. I interface with my database, my database is in cyberspace, so I’m interactive, I’m hyperactive and from time to time I’m radioactive.
Behind the eight ball, ahead of the curve, ridin the wave, dodgin the bullet and pushin the envelope. I’m on-point, on-task, on-message and off drugs. I’ve got no need for coke and speed. I’ve got no urge to binge and purge. I’m in-the-moment, on-the-edge, over-the-top and under-the-radar. A high-concept, low-profile, medium-range ballistic missionary. A street-wise smart bomb. A top-gun bottom feeder. I wear power ties, I tell power lies, I take power naps and run victory laps. I’m a totally ongoing big-foot, slam-dunk, rainmaker with a pro-active outreach. A raging workaholic. A working rageaholic. Out of rehab and in denial!
I’ve got a personal trainer, a personal shopper, a personal assistant and a personal agenda. You can’t shut me up. You can’t dumb me down because I’m tireless and I’m wireless, I’m an alpha male on beta-blockers.
I’m a non-believer and an over-achiever, laid-back but fashion-forward. Up-front, down-home, low-rent, high-maintenance. Super-sized, long-lasting, high-definition, fast-acting, oven-ready and built-to-last! I’m a hands-on, foot-loose, knee-jerk head case pretty maturely post-traumatic and I’ve got a love-child that sends me hate mail.
But, I’m feeling, I’m caring, I’m healing, I’m sharing– a supportive, bonding, nurturing primary care-giver. My output is down, but my income is up. I took a short position on the long bond and my revenue stream has its own cash-flow. I read junk mail, I eat junk food, I buy junk bonds and I watch trash sports! I’m gender specific, capital intensive, user-friendly and lactose intolerant.
I like rough sex. I like tough love. I use the “F” word in my emails and the software on my hard-drive is hardcore–no soft porn.
I bought a microwave at a mini-mall; I bought a mini-van at a mega-store. I eat fast-food in the slow lane. I’m toll-free, bite-sized, ready-to-wear and I come in all sizes. A fully-equipped, factory-authorized, hospital-tested, clinically-proven, scientifically- formulated medical miracle. I’ve been pre-wash, pre-cooked, pre-heated, pre-screened, pre-approved, pre-packaged, post-dated, freeze-dried, double-wrapped, vacuum-packed and, I have an unlimited broadband capacity.
I’m a rude dude, but I’m the real deal. Lean and mean! Cocked, locked and ready-to-rock. Rough, tough and hard to bluff. I take it slow, I go with the flow, I ride with the tide. I’ve got glide in my stride. Drivin and movin, sailin and spinin, jiving and groovin, wailin and winnin. I don’t snooze, so I don’t lose. I keep the pedal to the metal and the rubber on the road. I party hearty and lunch time is crunch time. I’m hangin in, there ain’t no doubt and I’m hangin tough, over and out!”

For anyone that frequently accesses remote file systems or actively develops on remote servers, you may find this brief tutorial helpful. SSHFS allows for mounting remote file systems over SSH. For example you have a server, let’s call it foobar.com. On this server you have your web root directory you want to access directly (/var/www/htdocs). From your local machine you could simply go to /media/foobar.com and view the files contained on foosprinkle.com:/var/www/htdocs. Here’s how…
Step 1:
$ sudo apt-get install sshfs
Note: It may fetch some dependencies. This is okay.
Step 2:
Now go ahead and create a local directory for your mounted directory. You’ll want permissions for that fresh directory so let’s do that as well.
$ sudo mkdir /media/foobar.com
$ sudo chown yourusername /media/foobar.com
Step 3:
You are going to need to add your account to fuse group. Not a problem, it’s simple.
$ sudo adduser yourusername fuse
Note: If you are running Ubuntu (perhaps others do this as well), you will need to logout and log back in. For added security this is required in order for your system to recognize you in your newly added group.
Step 4:
$ sudo sshfs remoteusername@foobar.com:/var/www/htdocs /media/foobar.com
Note: You can easily unmount this drive by issuing yet another simple command
$ fusermount -u /media/foobar.com
–
Enjoy!
About The Man:
Carnegie Mellon Professor Randy Pausch, who is dying from pancreatic cancer, gave his last lecture at the university September 18th, 2007, before a packed McConomy Auditorium. In his moving talk, “Really Achieving Your Childhood Dreams,” Pausch talked about his lessons learned and gave advice to students on how to achieve their own career and personal goals.
Watch His Speech:

At work I spend 8 hours a day invested in one facet of web development or another. I have been noticing that I spend less and less time working directly from my Windows box. PuTTy is my BFF! While working with Java based web services it’s not very practical, or good practice to be, developing on a Windows machine when ultimately it will be shipped over to Linux for production. What is the point of developing through Windows when the target is *nix? The sole reason I haven’t made the change prior is because much of the licensed software is for Windoze. I’ve been giving it some thought and since any IDE or DBMS application that I need have a greater, or at very least an acceptable, *nix counterpart. So today I popped in the Ubuntu install disk, kissed Windows goodbye, and am now looking forward to a more streamlined development approach. Just in case I feel the need to play with DLL’s I have a Windows box with VNC that I can remote into ![]()