Tim Habersack

Where I put my things..

Announcing ICLS

Apr 5th 2012

[caption id="attachment_135" align="aligncenter" width="565" caption="Adding an entry to ICLS"][/caption] What whaat?

That's right, I actually finished a side project. I worked on this on my lunch breaks occasionally for 2-3 months. Behold!

ICLS (Inconceivably Complex Logging System)

On Github: https://github.com/timbotron/ICLS

Summary

ICLS is a command-line, python-based logging system that supports tagging, searches, reports, etc. It stores this data in Amazon's SimpleDB, (in your account of course). Specifically, it's designed for a contract worker to be logging what they are doing at that time, bugs they figured out, etc. However, there are many other potential uses, such as having all your servers sending their log messages to one location.

The Name

Why call it 'Inconceivably Complex'? Because, in one sense, it's rediculous. You need to write a log? Write to a flat file. Writing to a cloud-based NoSQL data system is completely overkill. OR IS IT; I THINK NOT.

Notable features include

  • Dead-simple to add an entry (icls "entry text here")
  • Tons of options (Default tag, search by term, tag, date range, etc. see documentation)
  • icls.conf config file
  • entry retrieval and deletion

[caption id="attachment_124" align="aligncenter" width="600" caption="A report using a date range."][/caption]

Requirements

  • Python
  • Account with Amazon Web Services
  • Boto, a Python package, I didn't want to use any packages, but using boto makes the auth, etc much easier. And at the end of day, I want to get this working, not take forever re-inventing the wheel on HMAC signature generation.

Reason for Building

ICLS is a side project. I wanted a log I can throw all my little random posts into, without feeling weird about compromising the 'professionalism' of my identi.ca/twitter account. Also, I wanted to try working with Amazon's SimpleDB, and continue to strengthen my Python skills. And it totally worked for that, I feel more confident in my abilities.

[caption id="attachment_125" align="aligncenter" width="600" caption="Example of a search by tag"][/caption]

License

Copyright 2012 (c) Tim Habersack.

ICLS is licensed under a GNU General Public License (GPL) v3.

Why StatusNet is useful

Mar 28th 2012

Imagine a world where email aliases are a thing of the past. Where anything you've ever messaged someone is easily accessible and searchable. Where meetings are reduced greatly, so you can actually get your work done. Where you could easily reach out to other staff to find solutions to problems, even if you don't know they have that knowledge..

That world is here, now.

How can we arrive at this world, you may be asking? That answer is simple. StatusNet.

StatusNet is an Enterprise level, open source, web-based microblogging platform. Very similar to Twitter/Facebook (hashtags, direct messages, groups etc), but it can be hosted internally, and is customizable. (Increasing text limit, for example.) For those unfamiliar with the concept of microblogging, StatusNet has an excellent simple tour.

How this could work for your company

Imagine being able to follow specific hashtags. Some examples that come to mind are customers (#BobBoblaw, #Sony), products (#widget3, #turbowidget), or even technologies (#postgres, #linux).

Here's an example:

Bob Hall on the second floor is having problems with a #postgres db, so he asks:

Having problems in #postgres getting it initialized so #turbowhidget can hit it. It's at #CompanyX. Any ideas?

John Doe on the first floor follows the #postres hashtag, because he loves it so. Bob's message pops up on his timeline, so he replies:

@bhall Have you checked your postgresql.conf that the listen addresses are correct? #postgres

Bob Hall has that reply pop up in his timeline, since he is mentioned (via @bhall). He didn't know John was such a postgres whiz, and is happy he has the answer. But consider the secondary benefits.

  • Anyone else who follows the #postgres tag will see these messages.
  • Anyone who follows #CompanyX will also see this message (Think someone in Support on a ticket while Implementation is onsite)
  • Anyone who searches postgres later will see this information
  • Anyone who, later on, is having problems with the postgres installation at CompanyX could easily find this information

Email aliases go poof

With StatusNet, we wouldn't need to create a new alias for every project and group that is created. A group could be made in StatusNet. How is that better than aliases, you might be pondering?

  • Groups are in one place, you can search them
  • Anyone can see a list of a groups members
  • Members of a group can post a notice to that group. All other members of that group will see that notice in their timeline
  • Anyone can send a message to a group, even if they aren't a member via the bang. '!' (ex. 'Hey !IT the internal blog seems to be down')

Feeds for everything

StatusNet generates RSS feeds for every hashtag, user, and group. You don't need to even necessarily keep StatusNet open, you can be pulling in a feed for those hashtags you want to follow, into the tools you already use. Integrate a hashtag you use into Insight.

Notifications

By default a user is notified via email when someone mentions or sends a message to that user. The user can also decide to configure their account so they receive notifications on their cell phone.

3rd Party Apps

There's an app for that, seriously. PCs, (Windows, Mac, Linux), iPhone, Android, and the list goes on. If we allow external access to our StatusNet, a user can easily connect and update from anywhere, if they choose to.

Extras

Besides the functionality mentioned, there are other features we can activate. Be able to attach a file to your notice, post a bookmark, make a poll, etc.

Summary

I hope this encourages the reader to check out StatusNet if they haven't already. The things it can do for a companies internal communication are amazing.

My List of Android Apps

Feb 8th 2012

Here are some Android apps worth having. I'll add to this as I find more:

K-9 Mail client: https://market.android.com/details?id=com.fsck.k9

DroidEdit Free; syntax-highlighting file editor: https://play.google.com/store/apps/details?id=com.aor.droidedit&hl=en

Hackers Keyboard; much better than default, landscape is full, normal keys: https://market.android.com/details?id=org.pocketworkstation.pckeyboard

ColorNote; great task list/note taking: https://market.android.com/details?id=com.socialnmobile.dictapps.notepad.color.note

AL Voice Recorder: https://market.android.com/details?id=com.andlabs.vr

Alarm Clock Plus: https://market.android.com/details?id=com.vp.alarmClockPlusDock

Andricious; if you use Delicious to manage bookmarks: https://market.android.com/details?id=com.sherbert.delicious

Astro File Manager: https://market.android.com/details?id=com.metago.astro

Opera Mobile Web Browser; better than default, you can actually save files to locations on SD card you want! https://market.android.com/details?id=com.opera.browser

Barcode Scanner; useful for QR codes, sharing contacts via barcode, scanning ANYTHING: https://market.android.com/details?id=com.google.zxing.client.android

ConnectBot; terminal emulator: https://market.android.com/details?id=org.connectbot

Evernote App; if you don't know what evernote is, you should check it out: APP: https://market.android.com/details?id=com.evernote HOME PAGE: https://www.evernote.com/

Flashlight; lets you turn on your flash LED on as a flashlight.: https://market.android.com/details?id=com.devuni.flashlight

Handsent SMS; I wanted to customize my SMS/MMS views, layout, and this let me: https://market.android.com/details?id=com.handcent.nextsms

Music Folder Player; just got this, my mp3s aren't tagged well, I just want to play a whole dir: https://market.android.com/details?id=de.zorillasoft.musicfolderplayer

Xabber, XMPP/Jabber client: https://market.android.com/details?id=com.xabber.android

Xotof; if you are hosting Gallery 3.0, this integrates super well: APP: https://market.android.com/details?id=com.xotof Gallery Home: http://gallery.menalto.com/

Autumn done right

Nov 18th 2011

image

This tree impressed me with its dedication to the season. What a beautiful red!

JPEF Magic!

Nov 16th 2011

Links to the code first!

Github: http://github.com/timbotron/JPEF-Magic

What is JPEF Magic, you ask?

JPEF (Javascript, PHP, Email Form) Magic is a package which handles email forms in an elegant and simple manner. Essentially, it lets you add email forms to your site and deploy addition email forms down the road much quicker then creating each one from scratch.

Notable features..

  • Consolidation; instead of validation and post-processing on each form page, handled with one file
  • Email generated has full text from questions on form
  • Settings for email processing (Email Subject, From, etc) are handled in hidden inputs on form
  • After success, passes all the email body to the 'on success' page you've set up
  • Allows you to have one "Form submitted successfully" page, with the users info displayed.

Why did I make it?

I come across this need all the time. I always think, "Oh I'll just throw a form together." but after you take care of the php to mail it, error checking, it does take time. Couple that with the fact I hate using the name value in emails as the question. I wanted a way to just have the exact language of the question on the form be what was included in the email, with minimal duplication by me. Hence, JPEF Magic was born.

Check out the demo at: http://lab.citracode.com/jpef_magic/

My perfect office soup bowl/mug

Nov 15th 2011

Just a quick one today, pretty much unrelated to anything. :)

It is getting colder, as Autumn is losing territory to it's rival, Winter. That means soup should be the lunch of choice here for a while at the office. There's only one problem.. I have no bowl.

I ended up ordering this:

It's perfect! A handle so I can easily carry it back to my desk, but big enough to handle soup cans of all sizes, and homemade soup as well.

You can find it Here on Amazon

Installing/upgrading Firefox in a Linux environment

Oct 27th 2011

This is pretty simple, but I wanted to write up how to install/upgrade Firefox manually, in a Linux environment.

First thing that was tricky is, where is the "proper" place to install it? There is much debate on this point still, but I believe that installing to the /opt directory seems to make the most sense.

So we've downloaded the Firefox version we want to install:

[text]firefox-7.0.1.tar.bz2[/text]

It is sitting in a directory:

[text]/home/tim/downloads/[/text]

I open up a terminal and type:

[text]sudo tar -jxvf /home/tim/downloads/firefox-7.0.1.tar.bz2 -C /opt/[/text]

What is this command? Let's break it down:

  • sudo - "The following commands we are going to run as super user", necessary for putting things in the opt directory.
  • tar -jxvf - The tar program is what can compress and uncompress archives. We are using the options jxvf
    • j - the compression method that was used is bzip2
    • x - We are going to be extracting the archive.
    • v - We want the output to be verbose, so we'll see every file extracted.
    • f - We are going to tell it the file to extract.
  • /home/tim/downloads/firefox-7.0.1.tar.bz2 - The full path to the Firefox archive we are going to be installing.
  • -C /opt/ - We want to specify the directory /opt/ as where it is going to be extracted to.

Then, bam Firefox should be extracted to the /opt/firefox directory. Then what do we need to do? Well, depending on your Linux distribution, you need to add a shortcut to that to your menu somewhere, so it's easy to get to. The program the shortcut should point to is:

[text]/opt/firefox/firefox[/text]

UPGRADE: For upgrading your Firefox install you have in the /opt/ dir, you do the exact same thing. :)

Now I don't have to spend the 1 min remembering how to do this every time a new version of Firefox comes out. Hope it helps others.

Handling the URI structure change when moving to new CMS

Oct 25th 2011

I recently worked on an internal project that replaced a current web app. The new one had a cms behind it, and was overall a better product. So, we made it live, and moved the old tool. And all heck broke loose, since staff had bookmarks pointing to the old location all over the place.

Here is an example of the old link structure:

http://example.com/sub_dir/filename.html

The new link to the same content:

http://example.com/sub_dir/view.php?doc=filename

Now, sure I could try searching and replacing everywhere those links could live, but that sounds like a disaster. Instead I leveraged the mighty power of the mod rewrite in Apache.

I created a .htaccess file in the subdir/ directory. Then I added: [text] ReWriteEngine on RewriteBase /subdir RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*).html view.php?doc=$1 [/text]

1) We are turning on the rewrite engine. 2) setting the base directory as sub_dir. 3) Saying "If the requested file is not found..". 4) "Grab the text before the .html, and put it where the $1 is".

And bam! All those old links, when hit, point to the correct page. I thought this would be much harder than it was. I'm trying to tag the heck out of this post, so if others are looking to do the same thing, it is here for them.

Web Developers and Academics

Oct 20th 2011

I had a thought earlier: There is a comparison to be made between web developers documenting their progress of personal projects online, and academic types (scientists, researchers, etc) publishing papers.

Both groups have to keep publishing, else their respective fields will see them as not current or dedicated.

What appears to be a sweet payment system

Oct 19th 2011

I am sure people already know all about this service, but I didn't so I thought I'd share. Stripe is a payment system for web apps, where everything lives on their servers, you don't need to store any sensitive info yourself. That is very appealing to me. Also, their API looks really straightforward.

The cost is reasonable as well. 2.9% of the transaction, plus 30 cents.

Soon, I hope to have a reason to build their services into a web app. :)

< Older Newer >