Category Archives: Technology

DB2 Ownership Transfer

If you ever get an error in DB2 along the lines of…

SQLCODE=-727, SQLSTATE=56098, SQLERRMC=1;-551;42501;MARKJ|EXECUTE|XX.PROC_P

…but in your code are executing the proc as another user (say “USR1”) instead of MARKJ, it may be that MARKJ created the proc and until recently still had the necessary access for executing everything in XX.PROC_P. Subsequently permissions were “fixed” and now stuff starts blowing up all over because MARKJ no longer has access. How to fix? Well, like all things I’m sure there are a million ways to do it, but the easiest in this situation was to have MARKJ transfer the ownership on everything he owned. To determine that, the following SQL was run to generate the commands, then the commands were run…


SELECT 
CASE ROUTINETYPE WHEN 'F' THEN
    'TRANSFER OWNERSHIP OF FUNCTION  '||
    RTRIM(ROUTINESCHEMA)||'.'|| ROUTINENAME ||
    ' TO USER DB2DBA PRESERVE PRIVILEGES; '
ELSE
    'TRANSFER OWNERSHIP OF PROCEDURE  '||
    RTRIM(ROUTINESCHEMA)||'.'|| ROUTINENAME ||
    ' TO USER DB2DBA PRESERVE PRIVILEGES; '
END
FROM SYSCAT.ROUTINES 
WHERE OWNER = 'MARKJ' 
WITH UR;
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

OwnCloud webapp not reflecting true list of files

If you’re using OwnCloud and have a process whereby your add or remove files from directories via some sort of server process, you may find that you need to force OwnCloud to update/rescan the file listing. To do so you can manually run the following command…

sudo -u username php /path/to/owncloud/console.php files:scan --all

You may also want to consider adding it to the crontab for “username” on a daily basis.

Thanks to this site for pointing me in the right direction.

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Sendmail isn’t sending to domain.com : Linux

Say you’re using sendmail to relay email on a web server that you own that’s named “domain.com”, and email is being delivered fine to any domain except domain.com. What could be the problem?

  1. Rename your server. No server should be named with an actual domain name.
  2. Change /etc/hostname to the new name for your server
  3. Update /etc/hosts to remove the domain name and replace with the new hostname
  4. Remove the domain name from /etc/mail/local-host-names
  5. Restart sendmail “sudo service sendmail restart”
  6. Restart your server “sudo reboot”

Once you’ve done that test sendmail out like so…

echo "command line test" | mail -s "Sendmail test" me@domain.com
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Improved Linux command history

With four lines setup one time you can type the beginning of a command (ex: “ls”) then press the up and down arrows to see the most recent commands containing the text you typed (ex: “ls ~/scripts”) making it much easier to find what you’re looking for. To make this happen, create a text file called .inputrc in your home folder and put the following four lines inside:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

How to find and replace text in a string using Perl

To replace specific text in a string with other text, using perl, the syntax is…

$fullString =~ s/$findString/$replaceString/;
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Apple vs FBI

So my mom asked my opinion on the current standoff between Apple and the FBI over their insistence on building a back door into the iPhone “just this once” (wink, wink, nudge, nudge). As I said to her…

I completely agree with Apple’s stance. Once they create such a method to circumvent the security on the phone, I guarantee it will be ordered to do so from now until eternity. That is unless you believe everything the government and law enforcement tell you. In that case, then yes it will be just one time (wink, wink, nudge, nudge).

Let’s also address certain politicians insistence on “opening up” security and “using our heads”…

START: Sarcasm and Contempt
Yeah, let’s open up security all over the place. In fact, then no one will ever be able to transmit anything securely ever again. Hint: “open up” just means lets build in a vulnerability, a bug – intentionally!! You didn’t want your credit card info submitted securely now do you? Probably should let the gov’t be able to scan all your photos and financial documents, and travel plans, and basically anything that’s stored digitally. Not like that’s everything now a days.

Not that hackers or “bad guys” would take advantage of that or anything. Gahh!!

END: Sarcasm and Contempt

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Access a Console (including CYGWIN) from Notepad++

If you’re regularly in Notepad++ you may find the NPPConsole to be a huge help. With it you can access a windows console or even cygwin if you prefer (I do). To get started…

  1. Download the NPPConsole Plugin
  2. Extract the dll to your n++/plugins directory
  3. Restart Notepad++ if it was already running
  4. Use the Plugin Manager to make sure the plugin is available

If you want to just use the Windows console (DOS) you should be all set. To integrate with CYGWIN…

  1. Choose Plugins -> NppConsole -> About…
  2. In “Command to run” enter: C:\cygwin\bin\bash.exe ${–login -i}
  3. In Line number pattern after file name enter: :${LINE}
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

iPad 2 Black Screen Of Death

Tried to turn on our iPad today and got nothing but a black screen. If you would take it into a dark room you could tell that the back light was going on and off, but other than that it was just black. Tried a hard reset, and even did a full factory restore from the PC to no avail.

Then, I found this helpful YouTube video, and apparently the secret is just to beat the thing! Watch and see. It worked for me.

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

Windows Batch File (.bat) Not Running

If you’ve ever accidentally set batch files to open in a text editor, and now are unable to run them anymore you have to use the registry editor instead of the Control Panel file associations. As pointed out in this article

  1. Click on “Start”->”Run” and type in “REGEDT32” and press Enter to start the Registry Editor.
  2. Find the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.BAT\UserChoice
  3. Delete the key named “UserChoice”
Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.

My Evernote Wishlist

I’ll admit right off the bat that I love Evernote. It has a ton going for it and is extremely flexible. I’ve been a premium subscriber for 3+ years now so I think have a good handle on the things I would really love to see integrated into the platform.

  1. Recurring Reminders – It’s nice to be able to get a reminder, but what about that weekly status report?
  2. iCal Integration – I get it, you want to keep people on the platform but if I can’t see reminders on my calendar there’s less chance of me opening up the app in the first place (prob even more true for new users)
  3. Differentiate between overdue and future reminders. When I look at my reminders all I see is a huge list until I do the mental processing to say “oh, that’s not due until next week”
  4. Stop clearing my iPhone reminder notices. As soon as I open up the app, and close it I have no more visual indicator that I have something in there waiting for me. My suggestion would be to give users a couple options for what they want the little red counter to represent:
    • Due Today and Overdue Reminders
    • Overdue Reminders
    • Include Unread Chat Count
  5. Email tasks – I’ve sent this one in a number of times, but I’ll list it here to. I love the Evernote email integration, but why can’t I email myself a task? It could be as simple as all “[]” get converted to task checkboxes. (ex: “[] Pick up milk”)
  6. Improved search – I get it. The natural language and search in docs/images is great! But why can’t I easily search for all my overdue reminders? Or things due between this date and that? I don’t want to have to go to notes and click on the reminder icon that keeps moving but doesn’t show up unless your in snippet view. I should just be able to search “due:overdue” or “due:today”. Check out RTM, Gmail, etc. There’s a ton of companies doing this so not sure why you can’t.
  7. Web merge / multi-edit – One of the things I like the most about the desktop client is the ability to select multiple notes and merge them or edit (add tags, move to a notebook, etc). Would love this ability from the web client!
  8. Email clipper – When work doesn’t allow it or you’re on the go, to be able to send an email with a subject like “clip:http://freedomre.com” to my Evernote email address and have it clip the site/article to my account (instead of just creating a note w/ the link) would be awesome!

Oh, and I’d also like to report what appears to be a bug. If I email multiple tags with a reminder the first tag and reminder get set, but the 2nd tag gets put in the note title (ex: “This is a note @_Inbox #tag 1 #tag 2 !tomorrow” gets turned into a note with the title “This is a note #tag 2”).

While this may seem like a bunch of complaints you’ll notice most of it has to do with reminders and tasks. The rest of the platform is awesome and I love that I can use it across all my devices (Windows, Mac, Chromebook, iPhone, Android, Kindle, etc). I’d highly recommend giving it a try, and if you haven’t already, just click on this link to get a free month of Evernote Premium.

Please remember to subscribe to the newsletter or feed to stay up to date!

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself.