Category Archives: Quickie

Quick Note

Just upgraded CoffeeBear.net to WordPress 2.6. So this post is partly to make sure all my plugins are working correctly with it.

I’d also like to take a momemt to thank AWelkin & Bryon for the gifts they brought back from Japan for me. I’ve now decorated my cubicle with 3 Tachikoma gashapon. *yeah!* Also a quick thanks should go out to my buddy/ex-coworker Eric, he mentioned more than once I just needed the right motivation to get into programming1.  Well I recently had some slow time at work and wanted a way to parse some badly formatted data; so I wrote a Python script and while doing so certain things that have never clicked in my head about programming started falling into place.  I’ve since started working on another Python script for a different project at the office, so perhaps there’s some hope for my coding-fu yet.

1 I do a lot of computer stuff, but have never been much of a programmer.  Usually I just learn enough to hack somebody else’s stuff together to do what I want in rather ugly hacks.

Fixing Entries

A recent visitor to the CB pointed out a problem on some of my older entries.  It’s something I was expecting to have to fix but got sidetracked and never got around to.  Basically with the upgrade to WordPress 2.5.x, there are a couple of new settings in the wp_config.php file which have WordPress to use UTF-8 character encoding to better handle non-English langauges/characters.  However as older versions of WordPress automatically converted standard quotes/astrophes to their fancy/curly versions and those fancy versions are dependent upon which character encoding scheme they are written in.  Since I wasn’t sure how many entries I had that are affected by this and I wanted to leave the UTF-8 encoding enabled; I ran this SQL query to fix at least some of the problems: UPDATE wp_posts SET post_content = REPLACE(post_content,''','\'') WHERE post_content LIKE '%'%';

There are probably other characters I need to fix yet, so if you happen to see something like hieroglyphics on this site or other gibberish, let me know what entries you found it on so I can fix them.  And my thanks to Lynsey for prompting me to fix these entries.

Linux CLI Tip

Sometimes when you’re staring the bash prompt, you want to be able to see if a specific program is currently running. There are a couple of ways to do this; generally I run:
ps -ef | grep ProgramName

However I once saw a tip for doing something similar with top but I lost the link and for a long time couldn’t find it again. Truth be told, I still haven’t found that specific link but I did some googling and found the right cli switches to do it. Since I want to make sure I remember in the future, I’m posting it here:
top -b -n 1 | grep ProgramName

Tea Quote

Yea, though you walk through the valley of no-infusers you shall fear no tea leaf.

Be confident with Soft Viagra

While cleaning out the spam folder on one of my email accounts, I ran across a piece of spam with this particularly amusing subject line:

Be confident with Soft Viagra

Soft Viagra? Does that defeat the whole point of taking Viagra? 😀

Copyright © 2004 – 2020 CoffeeBear.net. Powered by WordPress.