Archive for the 'Geek Stuff' Category

08th Sep 2014

Social Media Reflections

So I’m taking a class on Social Media as part of my MBA program at Gonzaga.  It’s been interesting thus far, but one of the things I’ve noticed is that Social Media is assumed.  I’m fundamentally an introvert.  I can be outgoing when I need to be, but, given the choice, I’d much rather be by myself or with a small cadre of family and close friends.  I don’t take that much pleasure from casual relationships, yet it seems that much of the focus of social media is just that:  casual relationships.

I’m finding twitter fascinating to watch, and I’m enjoying the new ideas and bits of news that I’m picking up from some of the folks I’m following, but I’m not sure I have that much to say.  Does the wider world really want updates on my building projects?   Does anyone care about my thoughts on the ideal product development process?  Does adding my voice to the countless others do more than just create more noise?

I hope, as the course progresses, that we’ll look beyond just what it is, and how to do it, and spend some time on whether it should be done at all, and for what purpose.

Just because you can, doesn’t mean you should . . .

Posted in Geek Stuff, Musings | No Comments »

09th Nov 2013

Maybe my sanity will return . . .

My sincere thanks to Mr. Holt.  I sat down to do some serious writing on my Mac, instead of my work PC and kept stumbling into the idiotic behavior of the home and end keys.  This post provided the guidance I needed.  Yes!

For posterity sake, edit (or create) ~/Library/KeyBindings/DefaultKeyBindings.dict and add:

{
/* Remap Home / End keys to be correct */
\UF729″ = “moveToBeginningOfLine:”; /* Home */
\UF72B” = “moveToEndOfLine:”; /* End */
$\UF729″ = “moveToBeginningOfLineAndModifySelection:”; /* Shift + Home */
$\UF72B” = “moveToEndOfLineAndModifySelection:”; /* Shift + End */
“^\UF729” = “moveToBeginningOfDocument:”; /* Ctrl + Home */
^\UF72B” = “moveToEndOfDocument:”; /* Ctrl + End */
$^\UF729″ = “moveToBeginningOfDocumentAndModifySelection:”; /* Shift + Ctrl + Home */
$^\UF72B” = “moveToEndOfDocumentAndModifySelection:”; /* Shift + Ctrl + End */
}

Reboot and you’re done.

Posted in Geek Stuff | No Comments »

03rd Nov 2013

VOIPo & SPA122

For the past few years we’ve been using VOIPo for home phone service.  Honestly, it was a big step down from Packet8, but Packet8 wasn’t doing residential service anymore, and had gotten rather expensive.  When we signed up with VOIPo they included a crappy, unreliable GrandStream VOIP box.  After suffering with this for 18 months or more, I finally got around to installing a Cisco SPA122.  The unit, while old, is pretty cool.  In particular, it will implement a QoS mechanism to keep other stuff from stomping on your phone calls, and it supports dial plans.  For the first time in years I can do seven digit dialing.

I upgraded to firmware 1.3.2, configuring it between my router and my Wisp, Ptera.  This allows the SPA122 to act as a router and do its QoS magic.  I made my first call from my cell to the VOIP line.  Jen picked up, and the unit immediately hung up.  WTF!?  I had her call me.  Worked great.  I looked over the basically non-existent information provided by VOIPo.  Nothing stood out expect the line, “Please be aware that VOIPo is not able to offer any assistance with the configuration or troubleshooting of a third party device.”  Gee, thanks guys.  So much for “Amazing Customer Service.”  Don’t get me wrong, I understand that they can’t support every random device folks connect, but just a wee bit more information on provisioning would have been helpful.

A little more Googling and thinking, and staring at the SPA122 web configuration page, and I decided to simply turn off “provisioning” entirely.  I saved the configuration, and tried my calls.  This time stuff appears to be working like a champ.  I guess I’ll find out over the next week or two, but the audio quality appears to be much better.  Assuming my fix actually works, this may be just the upgrade I was looking for.

Posted in Geek Stuff | No Comments »

04th Jan 2009

Consolidated WordPress

This blog hasn’t gotten much love since the 52 Churches project started.  I was really tempted to just delete it.  Quite frankly, keeping track of multiple installations of Word Press gets old.  Don’t get me wrong, I love WordPress.  We’ve been pretty happy with our hosting service from BlueHost, and the blog has been a good outlet for Jen, but maintaining 4 (now 6) of these monsters was getting old.

I needed a better solutions.  A little digging on-line came across an approach at This n’ That for modifying wp-config.php to adjust the prefix. It was close, but not quite what I wanted.  Basically, Mr. Kaplan was advocating adding some PHP code to the wp-config.php file that looked like:
// table prefix, for hosting multiple installations in the same db.
$table_prefix = ereg_replace('^(www\.)', '', $_SERVER['HTTP_HOST']);
$table_prefix = ereg_replace('\.', '', $table_prefix);
$table_prefix = $table_prefix . '_';

What this does is throw away the www and any periods (full stops for those of you inclined towards the Queen’s English) in the domain name and use the rest of it as the prefix. This is fine, but it’s suboptimal when it comes to long domain names. MySQL has a limit of 64 bytes for the table name, but that would have to be shared with the stripped down FQDN and the native WordPress table names. If you have a domain name like schoolsareforfish.garriber.org, you start pressing into that limit pretty quickly. Nonetheless it gave me the inspiration I needed for the solutions I was looking for. My thanks to Mr. Kaplan for his insight.

My other complaint is that it ended up making a multi-line change in a WordPress source file, albeit a configuration file. I wanted something substantially more self contained. My solution was this: create a php file in the wordpress root directory that does the prefix determination and have it return the desired prefix. For example, you could create a file called prefixgen.php. That file might look something like this:


< ?php
#figure out *which* site we're hitting
if(preg_match("/subsite1/", $_SERVER['HTTP_HOST'])) {
$prefix='ss1_';
}
elseif(preg_match("/subsite2/", $_SERVER['HTTP_HOST'])) {
$prefix='ss2_';
}
else {
$prefix='main_';
}
return $prefix;
? >

Note: I’ve put spaces between the ‘<‘ and the ‘?’ to keep from confusing the computers

This does a pretty sloppy match. If the domain the user hits contains subsite1, it will map the prefix to ‘ss1_’. This is useful as it lets users go to www.subsite1.mysite.com, or direct to subsite1.mysite.com (assuming your DNS mappings and hosting provider are set up to support both). It does the same thing for subsite2. If nothing else it falls through to the main site (prefix ‘main_’). In this way, any DNS entry that resolves to your installation and gets to the right directory, but doesn’t map to a subsite, will go to your main site.

The update to wp-config.php becomes trivial. Change the prefix line to read:

$table_prefix = include 'prefixgen.php';

Presto! Clean and self contained. I’m a very happy camper. I now have a single directory with a single set of WordPress files serving all of our different sites. The sites are all stored in one database which makes for easier server side backups.  My “installations” at my hosting provider have become symbolic links to a single WordPress directory and, best of all, instead of having to manually update multiple WordPress installations, I just update one to upgrade.  Maybe I’ll let Jen keep this blog.  Maybe I’ll just take it over instead.  I could change the tag line to “Bits, Bytes, and Querries”

Posted in Geek Stuff, Zeteo | No Comments »

16th Oct 2007

Moving servers

garriber.org is moving off of our trusty Pentium M server and to an external hosting provider. As much as I love having my own local server, the ongoing energy consumption is a problem. The downside of this: fewer pictures. The upside: more likely to be on and available if you pop by to say hi.

Note:  as part of the this transition all of the old pictures are broken.  If you come across an old post that seems to imply a picture and has a lovely 4 digit number where one ought to be, engage your imagination and assume that something context appropriate used to be there.

Posted in Geek Stuff | No Comments »

07th May 2006

Integrating Gallery 2 into WordPress

The new garriber.org is being done using WordPress.  I recently added Gallery2.  Theoretically I should be able to reference pictures from it.  Enjoy the following from Hongkong.  It seems fitting for a geek post.
469

–Michael

Posted in Geek Stuff | No Comments »

07th May 2006

Wishes fulfilled

Jen has been pining for the return of her blog for some time. At long last I have migrated garriber.org to our own home server. Having done that, Jen can now blog until her heart is content, or her fingers have worn off.

Posted in Geek Stuff | No Comments »