TBP Sandwich

Turkey Bacon and Pear sandwich:

  • 4 slices turkey bacon
  • 2 slices ripe bartlett pear
  • 1/4 cup alfalfa sprouts
  • 1 tsp dijon mustard
  • 2 slices whole wheat or multi-grain bread

Grill turkey bacon until crispy or if you like it floppy, make it so. Toast bread until golden brown. Apply dijon mustard to toasted bread. Add slices of turkey bacon, pear, sprouts. Eat. It is delicious!

Work and Boredom

Work and boredom.- Looking for work in order to be paid: in civilized countries today almost all men are at one in doing that. For all of them work is a means and not an end in itself. Hence they are not very refined in their choice of work, if only it pays well. But there are, if only rarely, men who would rather perish than work without any pleasure in their work. They are choosy, hard to satisfy, and do not care for ample rewards, if the work itself is not the reward of rewards. Artists and con-templative men of all kinds belong to this rare breed, but so do even those men of leisure who spend their lives hunting, traveling, or in love affairs and adventures. All of these desire work and misery if only it is associated with pleasure, and the hardest, most difficult work if necessary. Otherwise, their idle-ness is resolute, even if it spells impoverishment, dishonor, and danger to life and limb. They do not fear boredom as much as work without pleasure; they actually require a lot of boredom if their work is to succeed. For thinkers and all sensitive spirits, boredom is that disagreeable “windless calm” of the soul that precedes a happy voyage and cheerful winds. They have to bear it and must wait for its effect on them. Precisely this is what lesser natures cannot achieve by any means. To ward off bore-dom at any cost is vulgar, no less than work without pleasure.

Exerpt from The Gay Science by Friedrich Nietzsche

Handling large mysqldump import with PHP

Client’s intranet is on an Apache / Windows box on the other side of the continent and we needed a quick way to synch up our development environment with theirs. Their database has been accumulating production data for over 36 months and the filesize of the export from phpMyAdmin reads 11.7MB. To avoid manual export from phpMyAdmin, we used the PHP system function to automate creation of the dump file as follows:

$cmd     =     “\path\to\mysql\bin\mysqldump.exe ”

.    “–skip-extended-insert ”
.    “–skip-add-locks ”
.    “–skip-add-drop-table ”
.    “–skip-set-charset ”
.    “–skip-comments ”
.    “–result-file=$filepath/$dump_filename -r $filepath/$dump_filename ”
.    “–user dbusername ”
.    “–password=dbpassword ”
.    “dbname”
;

system ( $cmd );

The resulting dump file from mysqldump is 15.4MB. We couldn’t use phpMyAdmin to import w/out suffering through several timeouts before the import was completed. What to do? We found this amazing script by Alexey Ozerov: BigDump

The BigDump script basically times itself out every 2 to 3 seconds (configurable) and restarts the dump where it left off from the previous import. It has a progress bar so you get visual status on the import.

Links

system: PHP function for CLI executable.
phpMyAdmin: PHP based MySQL administrative tools.
mysqldump: MySQL database backup program.
BigDump PHP script: awesome script that assists in huge dump file imports via http.
Notepad++: Windows text editor that preserves carriage return or line feed (CRLF, \r\n) format of the original document. Really helpful when editing a dump file created for use with BigDump.

Clearing Browser Cache

Update 2010.07.09: wikiHow has a great article on clearing browser cache.

Internet Explorer 6:

Tools (menu) -> Internet Options (menu) ->
Internet Options (control panel) -> General (tab) ->
Temporary Internet Files -> Delete Files (button) ->
OK (button)

Internet Explorer 7:

Tools (menu) -> Delete Browsing History (menu) ->
Temporary Internet Files -> Delete Files (button) -> Yes (button)

Firefox 2:

Tools (menu) -> Clear Private Data (menu) ->
Cache (checkbox) -> Clear Private Data Now (button)

Firefox 3:

Tools (menu) -> Clear Recent History (menu)
Time Range -> Everything (select menu)
Details -> Cache (checkbox)
OK (button)

Safari:

Safari (menu) -> Empty Cache (menu) -> Empty (button)

For more information on web cache: wikipedia.org/Web_cache

Email to SMS

Trying to figure out how to email a grocery list to our street team, we ran across this list of major US cell phone providers and how to format emails to send text messages:

Provider Email Format
Alltel: {number}@message.alltel.com
AT&T: {number}@mms.att.net
Nextel: {number}@messaging.nextel.com
Sprint: {number}@messaging.sprintpcs.com
Suncom: {number}@tms.suncom.com
T-mobile: {number}@tmomail.net
Voicestream: {number}@voicestream.net
Verizon (text only): {number}@vtext.com
Verizon (pics and vids): {number}@vzwpix.com

Replace the {number} with the 10 digit phone number of our recipient and now we can hand down our directives to the street team without ever picking up the cellie. Booyah!

GAX

UPDATE 2010.05.31: GAX was found to harbor a Trojan in the latest release from Dolphiq.

We’ve been using the Microfox screen ruler and screen loupe for doing pixel-perfect web design work for the past few years. It is definitely a very handy tool. But what about when you need to sample a color from a web page? Use the old ALT + “Prnt Scrn” button, paste it into a new Photoshop document, use the Color Picker to sample the image and get our hex value. There’s got to be a better way, right? What if there was a tool that had a screen ruler, a screen loupe, a resizable screen capture and a color picker, all in one? Check out GAX Reloaded from Dophiq Software Development. After using the software for a couple months, we don’t know how we ever got by without it. The good news is that it’s free! The bad news is that it’s only for Windows.  :(