All posts by Mark Jacobsen

The Best iPhone Apps

Despite what Apple may think, they don’t create the world’s greatest apps. I love my iPhone, but to really get the best experience outside of jailbreaking (work frowns on that) there are a handful of apps I use almost daily. Since I had a friend recently ask me about some of them I thought you, dear reader, may also find my “insight” useful. So in the interest of creating an up-to-date list of what i consider to be essential iPhone apps, I’ve created a page dedicated to The Best iPhone Apps!

Hit up the page for all my recommended iPhone apps, but here’s the top 3…

Toodledo
After trying just about every single to-do and task list manager under the sun, the one I keep coming back to is Toodledo.
Drafts
Far and away the best note taking and all purpose app
Fantastical
I wasn’t sure it would be worth it, but this app is so much better than the Apple calendar.

Hope you find something useful.

Google Chrome Keyboard Shortcuts for Tabs

So I hope by now everyone knows that Ctrl+T opens a new tab in Chrome, but I always forget these shortcuts so hope they help trigger your memory too…

  • Ctrl+T = Open a new tab
  • Ctrl+W = Close the current tab
  • Ctrl+1 through Ctrl+8 = Go to the tab at the specified position in the window
  • Ctrl+9 = Go to the last tab in the window
  • Ctrl+Tab = Go to the next tab in the window
  • Ctrl+Shirt+Tab = Go to the previous tab in the window

Note: Yes, these all appear to work in FireFox too. I’m just partial to Chrome.

Inbox Zero – How I do it

Why is it that when I mention I have no email in my inbox or that I just delete email I get these looks and comments of complete disbelief? Probably my two favorite comments are “How can you possibly do that?” and “You must not do anything.”

Well, I’m here to tell you that you can do it and that you can actually get stuff done. While there are a ton of ways to do this and you might want to tweak your implementation a little bit, I’m going to give you a run down of how I do it.

Ok, so how do you go about implementing inbox zero? First, create a new folder (Outlook) or label (Gmail) called “_oldCrapCloggingMyInbox”. Second, move all the email in your inbox into “_oldCrapCloggingMyInbox”. There, don’t you feel better already?

Now, repeat after me…

  • Delete
  • Delegate
  • Do
  • Defer
  • Delete
  • Delegate
  • Do
  • Defer
  • Delete
  • Delegate
  • Do
  • Defer

Got it yet? No? One more time then…

  • Delete
  • Delegate
  • Do
  • Defer

Ok, those are the 4 questions you need to ask yourself (in that order) for every email. Now you’re going to start honing your “deleteability”. Seriously, don’t be afraid of deleting email (if you’re really paranoid, replace delete with archive”).

Can I just delete this? If so, delete it. It’s liberating isn’t it?

If you can’t delete it, can or should someone else be doing it? If so, send it on its way and delete it.

If it’s something you have to do you have a decision to make. If it’s something you can do in 2 minutes or less – do it! Then delete it! If you can’t do it in 2 minutes or less either put it on a task list or move it to a “Read Review” folder/label. Naturally, if you put it on a task list – delete it.

Doesn’t that feel so much better?

Now, this may feel a little weird and it will take some getting used to, but practice it over the next few weeks and see if it doesn’t feel great to have an empty inbox.

You might also want to watch the original presentation by Merlin Mann.

Questions? Still think I’m crazy? Sound off in the comments.

Setup password-less SSH and SCP with public/private keys

Want to scp a file to another server without having to enter the password?  Want to just make your security even stronger?  Public/private keys to the rescue!  Of course, if you don’t know what I’m talking about or why you would want to do this, feel free to google it or just go visit another site.

For those still with me, you need access to both the local and remote servers (duh).  I’m going to refer to the server/host you are logged into as the local machine, and the one you want to connect to as the remote machine.

First, on the local machine you need to generate your public and private keys.  To do so, enter this command…

ssh-keygen -t rsa

Be sure to just hit enter to the questions you’re prompted with (otherwise you will have to enter a password when connecting with the keys – which goes against the whole point of this post).  This will create a couple of files in your .ssh directory (something like id_rsa and id_rsa.pub – your private and public keys respectively). Your public key (the file you want to distribute) ends in “.pub”. Assuming you have that file, send it over to the remote machine (perhaps with scp, yes?)…

scp ./id_rsa.pub user@server.com:/home/user/.ssh/id_rsa.pub

Of course password authentication isn’t enabled yet so you’ll have to enter the password. Next up, you need to login to the remote machine and visit your .ssh directory, and cat the .pub file into your “authorized_keys” file (don’t worry, the command below will create the file if it doesn’t exist. I leave it to you to know how to create the .ssh directory if needed)…

cat id_rsa.pub >> authorized_keys

It’s then a good idea to secure your file and delete the temporary public key on the remote machine…

chmod 600 authorized_keys
rm id_rsa.pub

Once you’ve done all this, you should now be able to connect without a password! Just use your private key…

ssh -i ./id_rsa user@server.com

Have fun!

SSH, SFTP, and SCP on non-standard ports

One common suggestion for securing a secure shell connection on Linux is to change the port that ssh runs on.  But how exactly do you connect to a server on one of these non-standard ports?

Naturally, the syntax is different for each so here goes:

ssh

ssh -p 33432 user@server.com

Yes, ssh uses a lower case p command line argument. Just wait until we get to scp.

sftp

sftp -o "Port 33432" user@server.com

Of course sftp uses a plain English option parameter of “Port XXXX”

scp

scp -P 33432 /home/user/file.txt user@server.com:/home/user

And naturally scp uses a capital P

Gotta love consistency!

Mount a Windows Share in Linux

So you want to access a Windows UNC share in Linux?  No problem if you know the magic commands and have root access.  This can be a great alternative to running cygwin if you are able to access a linux box (directly or via a virtual machine).

First, start by creating your mount point…

sudo mkdir /mnt/share1

Then, actually mount your UNC share to the mount point…

sudo mount -t cifs "//server/share1" /mnt/share -o username=my,password=secret

This would make \\server\share1 available to you on the Linux box as /mnt/share. Note the use of the options parameter (-o) to specify username and password.

Find DB2 Nicknames

Want to see the nickname setup for a DB2 database?  Here’s a handy query…

SELECT 
        NICK.TABSCHEMA,
        NICK.TABNAME,
        NICK.SERVERNAME,
        NICK.OWNER,
        NICK.REMOTE_SCHEMA,
        NICK.REMOTE_TABLE,
        SRV.SERVERTYPE
FROM    SYSCAT.NICKNAMES NICK
        INNER JOIN SYSCAT.SERVERS SRV
            ON (NICK.SERVERNAME = SRV.SERVERNAME);

Start ColdFusion8 on Ubuntu Server Start

Ok, so this is not the most bleeding edge post, but hopefully useful if you need it.  Here’s what you need to do if you need to get ColdFusion8 to start on server reboot (since it doesn’t appear to install itself as a service) using Ubuntu server.

First, create a service script and make sure it’s executable like so…

sudo touch /etc/init.d/coldfusion
sudo chmod 755 /etc/init.d/coldfusion

Next, you need to actually put something in the script…

sudo nano /etc/init.d/coldfusion

Here’s what to put in the file…

#! /bin/sh

### BEGIN INIT INFO
# Short-Description: ColdFusion8 service
### END INIT INFO

file=/opt/coldfusion8/bin/coldfusion

case "$1" in
stop)
$file stop
;;
status)
$file status
;;
restart)
$file restart
;;
*)
$file start
;;
esac

exit 0

Finally, you need to tell Ubuntu to use your service and make it available

sudo update-rc.d coldfusion defaults

New Essential WordPress Plugins Page

Curious what WordPress plugins you should bother to install?  I’ve created a resource page with the ones I find most useful.

Visit the Essential WordPress Plugins page now.

If there are any I missed that you find useful, please add them to the comments.

Seven commands developers can run to resolve issues in DB2 AIX development

Now here’s a super geeky one for you, but also super helpful when doing DB2 dev on AIX. Thanks to one of our App DBAs for providing this!

Please note that you will need DBADM rights to do some of these things so your mileage may vary.

First you need to determine what command(s) to run…

  • REORG(#1), RUNSTAT(#5), REBIND (#6) as a first step when performance is suffering
  • REORG(#1) when you recieve a SQL0668N reason code 7 or any other SQL message indicating a REORG is required
  • REORG(#1) after table alters or deleting lots of rows when you want to reclaim space.
  • REORG(#2) when you recieve a ADM6044E or a SQL2216N SQL error “-289” on a REORG (#1)
  • CLEAR LOAD PENDING (#3) when you recieve a SQL0668N reason code 3
  • RUNSTAT(#5) after REORGs(#1 or #2), data volume changes(+10%), and/or adding indexes
  • EMPTY A TABLE WITH A LOAD REPLACE(#4) when you want to empty a medium or larger sized table
  • REBIND(#6) after every RUNSTAT(#5) if you are using stored procedures
  • SET INTEGRITY(#7) to fix SQL0668N reason code 1

Then change the command syntax to match the required objects. All parameters starting with a dollar sign($) e.g. $TABSCHEMA, $TABNAME, $ROUTINESCHEMA, $ROUTINENAME, and/or $STEMP_TBSPACE must be replaced with valid table schema/name, stored procedure schema/name, system temporary tablespace.

Note: RAPID SQL 7.7.5 Issue: Add cast syntax (CAST(‘command-syntax’ AS CLOB)) if your version of Rapid SQL returns an error
Example: CALL SYSPROC.ADMIN_CMD (CAST(‘REORG TABLE $TABSCHEMA.$TABNAME ALLOW READ ACCESS’ AS CLOB));

Finally, run the commands via any interface that can call stored procedures including RAPID SQL

Other resources for troubleshoot messages or research other options for the commands supplied below by searching these

1. REORG A TABLE

CALL SYSPROC.ADMIN_CMD ('REORG TABLE $TABSCHEMA.$TABNAME ALLOW READ ACCESS');

2. REORG A LARGE TABLE

CALL SYSPROC.ADMIN_CMD('REORG TABLE $TABSCHEMA.$TABNAME ALLOW READ ACCESS USE $STEMP_TBSPACE');

Note: To find $STEMP_TBSPACE:

SELECT TBSPACE AS $STEMP_TBSPACE, PAGESIZE FROM SYSCAT.TABLESPACES WHERE DATATYPE = 'T' WITH UR;

3. CLEAR A LOAD PENDING **This leaves the table empty**

CALL SYSPROC.ADMIN_CMD('LOAD FROM /dev/null OF DEL TERMINATE INTO $TABSCHEMA.$TABNAME NONRECOVERABLE');

4. EMPTY A TABLE WITH LOAD REPLACE

CALL SYSPROC.ADMIN_CMD ('LOAD FROM /dev/null OF DEL REPLACE INTO $TABSCHEMA.$TABNAME NONRECOVERABLE');

5. RUNSTAT A TABLE

CALL SYSPROC.ADMIN_CMD('RUNSTATS ON TABLE $TABSCHEMA.$TABNAME ON ALL COLUMNS AND SAMPLED DETAILED INDEX ALL ALLOW WRITE ACCESS');

6. REBIND A STORED PROCEDURE

CALL SYSPROC.REBIND_ROUTINE_PACKAGE('P','$ROUTINESCHEMA.$ROUTINENAME','ANY');

7. SET INTEGRITY

SET INTEGRITY FOR $TABSCHEMA.$TABNAME IMMEDIATE CHECKED;