Plumbing – Ur doin it wrong!

September 9th, 2008

Wow.  Just wow.  Images first, description later.

Plumbing Fail - Front   Plumbing Fail - Side
Click the images to see the FAIL in all its full-size glory.

Yes. That is what you think it is. Apparently when you rent a place that has a claw-foot bathtub, you can’t have separate hot and cold knobs. So the landlord sent in a “handyman” to “bring it up to code” (quotes entirely necessary). So, obviously, installing a new faucet with copper pipes outside the wall and the fixtures installed through the shower curtain is up to code…

The only word for this is: FAIL

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Subversion Update Builder – Learning Python

September 6th, 2008

Ok, so I’m back.  It’s been a while.

I’ve decided I would like to jump on the Python bandwagon.  I’ve been living the Ubuntu life for a while now, so I figured I should make myself at home…

Whenever I learn a new language, I need a pet project.  I’m not one that can learn just by doing a Hello World, so I came up with this idea.

At work, I deal mainly with kiosks in the field.  They leave the factory and exist in a Toys R’ Us, Walmart, even BMW showrooms (check my company:  http://www.realityi.com).  When they go out, they have a certain version of content on them.  By content, I mean usually .swf, .xml, etc.  These are files that can easily be updated and are in a predictable file structure (seeming as I made it).  We’ve begun to finally use version control, using subversion as our drug of choice.  After much googling, I wasn’t able to find a viable way to create an update package.  It seems that most applications of subversion are connected and can use rsync/svn checkout to get the most update to date content, but machines in my situation are either completely disconnected and updated via USB, or connected to a network but behind a hefty firewall (eg: bmw).

What I needed was a way to find what files have been added or modified between a certain revision and the current content to build an update package (no removals, tell you why in a second).

Enter: SVNUpdateBuilder

SVNUpdateBuilderI’ve taken on a small, linux-based (for now) project that does just what I need.  It uses the pysvn library, and creates a .tgz file with a directory tree of files that have been added or modified.  I’m learning how to use Python, but also Glade User Interface Builder to create a GTK application.  Check out the website for more information.

You may be asking: “Why is it a compiled python file?”  Well, I’ll tell you.  This is still my learning tool.  I have a few more items on my wishlist that I want to complete before I release it to the masses.  Like I said on the website, this isn’t a difficult project for someone more skilled than I to build, but I would like to be selfish with it until I figure I’ve learned all I care to.  Then I definitely plan to release it on Sourceforge.

You may also be asking “What about files that have been removed?”  In my line of work, with how fickle clients are, it’s better, for now, for us to leave content on the machines and just remove the link to the file in the xml (read: send a modified file).  That way, if a client wants a video relinked on a kiosk, we just have to relink it, not send it out again.  Disk space, for this current project, isn’t a concern as much as bandwidth, so we chose to leave the files out there.  Plans for this project include having output methods for bash scripts or batch files to clean up the target machine, but they haven’t been implemented yet.

So, I will continue to code…  I’ll keep you posted.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Mininova.org RSS/Autodownload and KTorrent on Ubuntu = Ultimate Torrent Setup

July 9th, 2008

Everybody wants to be able to download a file at the spur of the moment.  Mininova.org just made it a ton easier to set it up to be completely automatic.  They call it Bookmarking and Remote Downloading.  I’m going to detail my current setup.

WARNING!!!

I’m assuming you’re going to use this for indie/underground music.  This is in NO WAY TO EVER BE USED TO DOWNLOAD LICENSED OR ILLEGAL MATERIALS.  You’ve been warned….

That’s right, it’s so important, that I used the <blink> tag… *shudder…

Setup
For clarity, let’s call my two machines “home” and “remote”.  “Home” is an ubuntu box in my home office.  “Remote” can be any web browser, for example, my laptop at work.

Registration
For this example, go to www.mininova.org and sign up for an account.  Once you are logged in, in the top right, point at your username, and select My Bookmarks.  You will need this RSS URL during installation.

Installation

  1. I’m using KTorrent on my home machine.  Install that by opening a terminal and typing:
    sudo apt-get install ktorrent
  2. Set it up to auto-launch when the system boots by
    1. Go to System > Preferences > Sessions
    2. Click Add
    3. Name: KTorrent
    4. Command: ktorrent
    5. Comment: <whatever you want>
  3. Run ktorrent by either clicking Applications > Internet > KTorrent, type ktorrent at the command line, or reboot your machine.
  4. Click on Settings > Configure KTorrent
  5. Select Plugins
    1. Click on RSS Feeds and click the Load button in the top right.
    2. [OPTIONAL] You may want to enable/configure Bandwidth Scheduler as well to not piss off people in on your “Home” machine’s connection from slowing it down during heavy use hours, but that is outside the scope of this tutorial.
    3. ClickApply and OK to exit the window.
  6. Back in the Application, you should now see a RSS Feeds tab, click that.  On that tab [Figure 1 Below]:
    1. Click New in the bottom left to add a new feed.
    2. Name it whatever you want.
    3. Copy/Paste the RSS Feed URL you got from your Mininova.org site into the URL line.
    4. Change Keep Articles (days) to something smaller, like 7 days
    5. Click Ignore TTL and enter something more reasonable like 10 minutes (it is in the format HH:MM:SS)
    6. Click the Active checkbox in the top left.
    7. Set up the AutoDownload Filter [Figure 2 Below].
      1. In the top left of the RSS tab, click the tab that says Filters*.
      2. Under Accept Filters, click New
      3. Type in a title
      4. Under Regular Expressions, type .*    (period asterisk, no spaces before, after, or in-between) and click Add
      5. In the top right, click the Active Checkbox.
Creating the RSS Feed Applying Auto-Download Filters
Figure 1 Figure 2

* NOTE: Since you are setting up a personal RSS feed, I am assuming you want to download everything you mark for download. This Filter tool is very powerful.  You are able to watch the rss feed on any torrent site and filter out things that you want to download automatically such as episodes, new albums by bands, etc.  A handy tool to generate the regular expressions needed for the Filters page is called kregexpeditor and can be installed with apt-get.

Testing
Go to www.mininova.org and log in.  Search for anything you’re looking for, click on it, and at the top of the page you should see a button under the Download this Torrent link to Add to Bookmarks.  Clicking it adds this torrent to your RSS feed.  Your home machine will refresh your rss feed (at the period you set the TTL to, 10 minutes in this example) and mark that file for auto downloading.

Final Notes
I just got this working and I was rather excited to see how well it worked right off the bat.  I’ll edit/update this article as I find problems/fixes.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

sproif.com is Digg proof thanks to caching by WP Super Cache!