Dogbert Ergonomic Consulting Co. on Standing Desks

General — Jeff Eske on February 28, 2013 at 8:55 am

Dilbert 2013-02-27

Dogbert got it right.  It’s not that complicated.  Over a year and a half in and still standing.

Jeff Eske

OTRS – Mobile Front-end

OTRS,Programming,Web Stuff — Jeff Eske on February 19, 2013 at 1:30 pm

I’m in the process of creating a mobile front-end for OTRS.  There are a couple of decent apps out there that can be used on iOS and Android, but I decided to create a completely HTML-based version, just because I can.  I’ll post a video of the progress so far.

Stay tuned.

UPDATE: I have a link to a short video that shows it in action below.  Click on the image to view the video.

In the video, I’m accessing the mobile pages on my old Motorola Droid X.  I’ve tested it on the Droid, as well as an iPhone 4S (being used to take the video) and an iPad.  Since it’s really basic HTML, it works great on all of them.


OTRS Mobile front-end walkthrough

OTRS Mobile front-end walkthrough

It’s still very much a work-in-progress.  Currently, it’s “read-only”.  I’m in the process of adding two-way functionality, utilizing OTRS web services.

Jeff Eske

Homemade Leather iPhone Case

General — Jeff Eske on February 6, 2013 at 5:10 pm

When I got my iPhone 4s for work, I needed to get some type of case for it.  What I started out with, was a basic case from Incipio.  The case worked great, but after a while, I realized that I needed a case that could actually carry some ID cards as well.  There are doors, as well as parking lot access gates here at work that require a swipe card for access.  I originally just carried the cards in my fancy homemade leather wallet, but that meant that I had to pull my wallet out every time.

Rather than buying an iPhone case that included a card pocket, I decided to make one.  I had already made a watch band and a wallet, so why not a phone case?  The band and the wallet were both hand-stitched, since the leather was pretty thick, but phone case leather was thin enough that I decided to give my old (OLD) Singer a run at it.  It worked perfectly.  Now, I can keep my work-related access cards together with my work-related phone.  It will comfortably hold the phone, plus a couple plastic cards and a business card or two.

Jeff Eske

iPhone case with the iPhone and cars in it.

iPhone case with the iPhone and cards in it.


iPhone case empty.

iPhone case empty.


Homemade Leather Wallet

General — Jeff Eske on February 6, 2013 at 5:00 pm

As you can probably tell from the pictures below, I’ve been using my handmade leather wallet for a while now.  I originally decided to make a new one, just to see if I could.  For years now, I’ve carried around a tri-fold wallet that would just continue collect stuff – receipts, ATM slips, business cards, you name it.  I decided that I wanted to move to a smaller wallet, to hopefully keep me from ending up with such a brick in my pocket.  So far, it’s worked pretty well.  I’m now forced to clean it out more often, which has helped to keep it smaller.  If/when I remake it, I’m probably going to make the bill area a little thicker. As you can also tell from the pictures, it’s time to clean it out again…

Jeff Eske


Empty wallet.  As you can see, it's taken on the shape of all the "stuff" that it carries...

Empty wallet. As you can see, it’s taken on the shape of all the “stuff” that it carries…


The back of the wallet.  As you can see, it's taking on a nice patina.

The back of the wallet. As you can see, it’s taking on a nice patina.


The wallet, fully loaded.

The wallet, fully loaded, from the top.


Top View - Empty

Top View – Empty

Android Watch with Homemade Leather Band

General — Jeff Eske on February 6, 2013 at 4:43 pm

I received an Android Octopus (Octopuz?) watch for Christmas 2011.  I absolutely love the watch, but decided that I didn’t really like the rubber warch band that it came with.  For a while, I wore it with a cheap steel bracelet that I picked up years ago, but that just didn’t really look right on it.  Finally, I decided that I needed to do something about it, once and for all.   I’ve been messing around doing some leather work for a while now, so decided to make a leather band for it.  I cannibalized the original rubber band for the buckle and strap hold-down, so it’s still branded like it belongs on the watch.  I really like it this way.  To me, the band makes it seem semi-formal, not as casual as it originally was.

Jeff Eske

Stock image of Octopus with rubber strap.

Stock image of Octopus with rubber strap (courtesy of


Watch with the new band.

Watch with the new band.


Watch with the band stretched out.

Watch with the band stretched out.


Android Buckle closeup

Android Buckle closeup


PHP – Poor Man’s Data Export/Combine Script

Programming,Snippets — Jeff Eske on February 5, 2013 at 4:50 pm

I ran into a situation a while back where I needed to merge some information from 2 separate tables into one table.   Basically, I was sort of breaking normalization rules in favor of simplicity.  I basically had a table full of helpdesk tickets with a field for customer numbers, but no customer names.  I also had a customer table that contained all of the customer information.  Since I was making a system that’s going to be “read-only” for looking up the old tickets, I wanted to be able to query a single database, when looking for the old tickets.

So, basically, I cobbled the basics of this script together to pull information from the two different tables and combine it into one single record.  I pulled the ticket record, then did a sub-search on the customer table to find the customer name in the customer table associated with the customer number from the ticket table.

Then, once that was done, I cleared the ticket table and turned around and imported my brand-spanking new csv file BACK into the ticket table, with the customer number field adjusted to be the customer name.

There’s probably an easier way to accomplish this, but when all you have is a hammer (PHP programming experience), everything looks like a nail.

Here’s the basic code.  It’s a little confusing since I’m just using generic field1, field2, etc.


#### Variables to Set
$db_host = “localhost”; // Database server name
$db_user = “db_user_username_here”; // Database Username
$db_pass = “db_user_password_here”; // Database User’s Password
$db_table1 = “your_first_table_here”; // Table name, written as database.table
$db_table1 = “your_second_table_here”; // Table name, written as database.table
$csv_filename = “csv_filename_here”; // name of the output file

#### Database Connection
$db_connect = mysql_connect($db_host, $db_user, $db_pass) or die(“couldn’t connect to DB server”);

#### Open the csv text file for writing
$csv_file_out = fopen($csv_filename,”w”); // name of the output file

#### Query the first database
$sql1 = “SELECT field1,field2,field3 FROM $db_table1”;
$result1 = mysql_query($sql1, $db_connect);

#### Pull each record from the first database then do a subquery for the related record from the second database.
while($data1 = mysql_fetch_object($result1)){ // cycle through first database’s records
// Find the record in database2 that is related to the record in database1 via field1 in both
$sql2 = “SELECT field1 FROM $db_table2 WHERE field1 = $data1->field1″;
$result2 = mysql_query($sql2, $db_connect);
// Write out field1, field2, and field3 from database1, plus field1 from database2
$write_line = $data1->field1.”,”.$data1->field2.”,”.$data1->field3.”,”.$data2->field1.”\n”;
fwrite($csv_file_out, $write_line);
#### Close the text file when finished


Jeff Eske

PHP – Cheesy Little PHP Script

Programming,Snippets — Jeff Eske on February 5, 2013 at 4:04 pm

Here’s a cheesy little script that parses a block of text and “linkifies” URLs.  It basically breaks the text into individual “words” and stores them in an array.  It then checks each array element to see if it appears to be a web address.  If it appears to be, it encloses address in the appropriate link code, so that it will be clickable.  If not, it simply spits it back as-is.



$content = “This is some test content.”;
#### Parse content for URLs ####
$shrapnel = explode(” “,$content); // break the text string into pieces and place them in an array.
$total = count($shrapnel); // count the pieces of shrapnel
for($i=0;$i<=$total;$i++){ // step through the array, looking at the pieces to see if they start with http
if(preg_match(“/^http./”, $shrapnel[$i])){
echo”<a href=’$shrapnel[$i]’>$shrapnel[$i]</a> “;
echo”$shrapnel[$i] “;


You could also add a regexp for “www”, if you wanted to catch websites that don’t include the http or https.  Obviously, this has no error handling or anything else included.  It came in handy in a particular situation, so I decided to post it.

Jeff Eske

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Jeff's Blog