Blog - Wiki


(J)ack (O)f (A)ll (T)rades
Mostly Security, Some
Blogging, Misc. Admin,
and Bits of My Life.

May 2013
Sun Mon Tue Wed Thu Fri Sat
     
 

Archives
2013 (9)
  - May (7)
  - April (2)
2012 (3)
  - November (1)
  - August (1)
  - April (1)
2011 (36)
  - November (3)
  - October (1)
  - September (5)
  - July (2)
  - June (4)
  - May (5)
  - April (4)
  - March (2)
  - February (4)
  - January (6)
2010 (70)
  - November (10)
  - October (7)
  - September (7)
  - August (11)
  - July (10)
  - June (2)
  - May (2)
  - April (7)
  - March (4)
  - February (5)
  - January (5)
2009 (59)
  - December (2)
  - November (7)
  - October (4)
  - September (6)
  - August (4)
  - July (5)
  - June (1)
  - May (6)
  - April (4)
  - March (6)
  - February (6)
  - January (8)
2008 (133)
  - December (9)
  - November (10)
  - October (7)
  - September (7)
  - August (10)
  - July (14)
  - June (6)
  - May (10)
  - April (9)
  - March (13)
  - February (19)
  - January (19)
2007 (194)
  - December (15)
  - November (14)
  - October (17)
  - September (18)
  - August (19)
  - July (14)
  - June (11)
  - May (11)
  - April (18)
  - March (9)
  - February (26)
  - January (22)
2006 (373)
  - December (23)
  - November (31)
  - October (21)
  - September (34)
  - August (34)
  - July (34)
  - June (34)
  - May (31)
  - April (33)
  - March (34)
  - February (28)
  - January (36)
2005 (532)
  - December (36)
  - November (39)
  - October (41)
  - September (35)
  - August (42)
  - July (51)
  - June (34)
  - May (45)
  - April (44)
  - March (51)
  - February (52)
  - January (62)
2004 (1107)
  - December (49)
  - November (82)
  - October (78)
  - September (117)
  - August (144)
  - July (142)
  - June (113)
  - May (54)
  - April (76)
  - March (82)
  - February (87)
  - January (83)
2003 (551)
  - December (53)
  - November (50)
  - October (60)
  - September (46)
  - August (55)
  - July (47)
  - June (49)
  - May (50)
  - April (54)
  - March (57)
  - February (28)
  - January (2)

Tue, 21 May 2013

Scripted Xchat tab renaming 21 May

Following is a shell script that will rename a specific tab in Xchat. Reason I came up with this is that Bitlbee produces some very ugly channel names in Xchat. In one of the much older, branch versions of Bitlbee, there was a function that allowed you to rename the channel. This has since gone away.

While poking around in the Xchat command set, I found the settab command which allows you to temporarily (until the next join) rename a channel. A bit of further research showed a dbus interface to Xchat. From there, it was simple.

   #!/bin/bash

#following renames specific channels in Xchat2

# "#192.168.2.215_docs" to "docs"

context=`dbus-send --dest=org.xchat.service --print-reply --type=method_call /org/xchat/Remote org.xchat.plugin.FindContext string:"bitlbee" string:"#192.168.2.215_docs" | tail -n1 | awk '{print $2}'`

dbus-send --dest=org.xchat.service --type=method_call /org/xchat/Remote org.xchat.plugin.SetContext uint32:$context

dbus-send --dest=org.xchat.service --type=method_call /org/xchat/Remote org.xchat.plugin.Command string:"settab docs"
  

The configurable bits are the two "string" entries in the line starting with "context" and the "settab docs" entry in the last line beginning with "dbus-send". Note: if you make an error in the "string" entries, the channel name for the previous call will be changed. (You'll know what I mean when it happens.)

Chain a bunch of these in a single script and you can mass rename channel tabs. Add a desktop launcher for the script and you can mass rename Xchat tabs with a single mouse click. Enjoy!

joat: 04:53:24 21 May 2013

Sat, 18 May 2013

Eating my own dog food 18 May

When working on Unix systems with other people, I often point out that rule #1 is "Read The Fine Manual". Alternative phrasing can include: "What's the man page say?" or "You should search Google for that." The idea being that they should get used to looking things up. Asking questions should be the method-of-last-resort.

That being said, it looks like I need to be eating my own dog food. At one point, early in the development (it may have been a branch) of Bitlbee, there was the ability to rename the channel. Instead of having to live with "#identica_packetgeek", you could make the channel name look like "identica". This function was short-lived as it wasn't retained in later versions.

In setting up a new document management system, complete with Statusnet instance to track document updates, I needed to point Bitlbee at the new interfaces (Statusnet and XMPP). I don't remember why it was that I was reading the XChat2 docs, but I stumbled across the "/settab" commend. It's exactly what I'd needed.

Now my Bitlbee channel list looks like: "news", "docs", "identica", and "twitter", instead of "#192.168.2.215_news", "#192.168.2.215_docs", "#identica_packetgeek", and "#twitter_packetgeek". Much, much cleaner!

Now you'll have to excuse me while I take myself out back and beat myself up.

joat: 22:40:31 18 May 2013

Sat, 11 May 2013

Modifying SemanticScuttle to open a new window 11 May

One of the annoying things in SemanticScuttle is that clicking on a listed link opens that link in the current window. This is easily fixed:

  1. Find bookmarks.tpl.php and open it in your favorite text editor.
  2. Fidn the line containing the word "taggedlink" and add the following (inside of the href brackets):

      target="_NEW"

The line should look something like:

  <a href="'. htmlspecialchars($address) .'"'. $rel .' target="_NEW" class="taggedlink">'

That's it. Clicking on a link should now open the listed bookmark in a new tab or window (depending on how you have your browser configured).

joat: 18:13:42 11 May 2013

Building my own search engine 11 May

(From the How Hard Could It Be? Department) Google Reader's pending retirement caused me to start looking for alternative readers. I decided that Tiny Tiny RSS was about the best so went about attempting to install it on the house server. Right away, it complained about the version of PHP employed.

Knowing that this would cause trouble with the KnowledgeTree instance, it looked like a general upgrade was needed. Discovered a problem: KnowledgeTree no longer offers their Community Edition. Ignoring the fact that this effectively angers anyone that ever contributed code to the project, this left me in a difficult spot: run TT-RSS in a VM or come up with alternatives.

After looking at various other DMS software, I started reading about how search engines index documents. Terms like inverse indexing, relative scoring, and soundexes have become familiar. After experimenting with various text management tools and a number of databases, I'm more in awe of Google (and Bing, somewhat) now than I was before.

All that being said... In the interim, I'm running the last available Community Edition of KnowledgeTree, running on the latest version of PHP, with known work-arounds in place (there's a growing number of them).

I'm also learning about some of the obstacles that are inherent with indexing documents. Example: (and it's a horror) PDF appears to be a typesetting language. Even the good text extractors have issues with it. The letter "f" and bolding causes no end of problems in extracted text (there's usually a space after each "f" and bolding tends to produce "doubled" characters in extracted text).

Hopefully, at the end of all this, I'll have a simple program to index all of the documents (pdf, doc, & txt) that I've gathered over the years. If "simple" is unrealistic, I'll probably shoot for "portable".

joat: 08:02:13 11 May 2013

Wiki online 11 May
The wiki's text content is back online. There's a few pictures missing from it so I'll be working those next.

joat: 06:32:36 11 May 2013

Wed, 08 May 2013

Getting there 08 May
Attempting to get the wiki online. There seems to be an issue with file ownership and write permissions. I'll be working on it over the next few days.

joat: 06:00:04 8 May 2013

Wed, 01 May 2013

Fixing stuff 01 May

It's starting to look like it will take a very long time to correct all the munging that Posterous did to each post's formatting and punctuation as they are all manual. I've decided to put it up as-is, work on a local copy, and push the updates to the blog on a weekly basis. It keeps the blog online, without interruption.

joat: 05:25:41 1 May 2013

Tue, 30 Apr 2013

Update 30 Apr
Just before pushing the blog back onto the 757 server, I did a test build and noticed a couple things that will delay the push.

A quick "du -sh" check shows that the blog is 13GB in size!?? That's not right. Issue turned out to be in the rendering settings. Having the Blosxom script generate statics pages and encoding for xml entities adds a non-short string of 2525252525's to the link for each story. Setting $encode_xml_entities to 0 fixed this.

The content's life on other blogging systems played havoc with its content. I probably should have guessed that they'd re-encode various pieces but it's become a bit ugly. I'm having to read through each story (all 3000 of them) and fix paragraph tags, remove gratuitiously inserted line breaks, and reset all non-standard character encodings.

End result is a delay and development of a strong opinion that anyone who wirtes custom markup languages for web sites (in this age of AJAX and CSS) deserves a sharp kick in the shins (both of 'em!) by someone wearing steal-toed boots.

joat: 06:58:25 30 Apr 2013

Sun, 28 Apr 2013

...and we're back! 28 Apr
Since Posterous has been acquired, the blog is falling back into its old haunts (those at 757). I managed to find most of the static-page-generating code that originally generated the blog (i.e., a highly customized Blosxom instance).

The one thing lost by converting Blosxom to Wordpress to Posterous (and back again) is the Categories. I'll be debugging the code over the coming weeks, fixing various bugs as they pop up, and generally sorting posts back into Categories. If you see anything annoying, send me an email. (Note: stuff may move around a bit.)

In any case, I have a serious backlog of stuff to post. I just need to get back into the practice of writing short articles and posting them.

joat: 21:54:52 28 Apr 2013

Mon, 26 Nov 2012

Spectrum v1 howto 26 Nov

It's taken me awhile to develop the notes to the point where they're share-able but I've finally posted the draft guide for setting up Spectrum v1. I've included notes on interfacing Spectrum with eJabberd, Openfire, Munin, and Monit.

The PDF is in Google Docs. Let me know if you find any bugs?

joat: 12:00:00 26 Nov 2012





Search this blog
Categories
asterisk
audio
blogging
collaboration
dms
hardware
munin
radio
rpi
silliness
storage
streaming
tweaks
uncategorized
virtual
xmpp






Geekin' hard, so you don't have to...
... and driving my friends absolutely batty in the process!