Archive for Miscellaneous

Securing SSHD Root access

How To Secure SSH Root Access: originally posted at [sagonet.com)[http://forums.sagonet.com/showthread.php?t=1820] and reposted here for my own archives.

This article describes how to secure root access via SSH. The information in this article applies to both cPanel, and Interworx based server.

<

p> Read the rest of this entry »

Comments

Returning a RECORD from PL/pgsql

Been a while since I posted, but here’s a nice tip that I had to figure out the hard way.

Problem - Using a function in INOUT and OUT parameters to pass information back to another function. This is function I needed to return data from.

 CREATE OR REPLACE FUNCTION vx_string.get_next_token(p_delimiter IN varchar,
      p_text INOUT varchar, p_return OUT varchar) RETURNS RECORD AS $BODY$
     DECLARE
          v_position   INTEGER;
    BEGIN
        -- Find position of delimiter.
        v_position := vx_utils.instr(p_text,p_delimiter, 1);
       IF v_position > 0 THEN
           p_return := SUBSTR(p_text, 1, v_position - 1);
           p_text := SUBSTR(p_text, v_position + LENGTH(p_delimiter));
       ELSE
           p_return := p_text;
           p_text := '';
       END IF;
       RETURN p_text, p_return;
    END;
    $BODY$
    LANGUAGE 'plpgsql' VOLATILE;

Solution - In order to return the values I found I needed to SELECT the values INTO specific vars using the SELECT * INTO …. syntax as follows:


    DECLARE
        v_line TEXT;
        v_temp TEXT;
    BEGIN
       -- notice we only pass in the first two vars since they
       -- are IN and INOUT respectfully. They OUT parameter is only used
       -- in the returning record.
       SELECT *
       INTO v_line, v_temp
       FROM
       vx_string.get_next_token(';','0001; My Test Line; My Test Line; My Test Line');
       -- at this point, v_line equals "My Test Line; My Test Line; My Test Line"
       -- and v_temp equals "0001"
       -- Now, I can use v_line and v_temp within this procedure
       v_line_nbr = TO_NUMBER(v_temp,'99999');

Comments

Reinitializing CPAN

I recently had to reinitialize my cpan repository after about an hour of pulling my hair out due to some modules not loading correctly. Here’s the call to reinit.

> perl -MCPAN::FirstTime -e CPAN::FirstTime::init

Comments

YubNub - Command Line for the Web

YubNub

In case you haven’t seen [YubNub](http://yubnub.org), I encourage you to check it out. I saw it during the Rails Day contest and was just reminded again by [Micheal over at TechCrunch](http://www.techcrunch.com/2006/01/15/revisiting-yubnub/). He pointed to a great resource for [some of the more useful commands](http://yubnub.org/documentation/jeremys_picks#Whois) collected by Jeremy Hussell.

Comments (1)

Symantec ‘Rootkit’

Symantec has been [caught putting a simple ‘rootkit’](http://www.eweek.com/article2/0,1895,1910077,00.asp) type feature in the latest version of SystemWorks. Though the idea was much more benevolent than Sony’s recent attempt at a rootkit, it still stinks of a growing trend of commercial products that just don’t seem trustworthy anymore.

I switched from Symantec to Trend Micro last year, but only because the SystemWorks product seemed to really slow my PC down.

[(Link)](http://www.eweek.com/article2/0,1895,1910077,00.asp)

Comments

Compromise Reached On 802.11n Spec

“The road to next-generation Wi-Fi now appears to lead toward an industry-standard IEEE 802.11n specification, as the competing groups resolved their differences Wednesday.” - ExtremeTech (Link)

Comments

The Last iPod Video Guide You’ll Ever Need

I bought my iPod about a two months ago. To date, it’s been an audio only experience, except for the silly fireplace video I pulled down just before the Christmas holidays. Don’t ask, I’m not sure I know why it was so intriguing now.

This article (The Last iPod Video Guide You’ll Ever Need) might get me inspired enough to actually experiment with the video side of things though.

Comments

Gregarius - RSS Aggregator

“Gregarius is a web-based RSS/RDF/ATOM feed aggregator, designed to run on your web server, allowing you to access your news sources from wherever you want.”

I love the [bloglines service](http://www.bloglines.com), but lately I’ve been missing out on some of my feeds due to problems with the service or maintenance downtime of some sort. So, I decided to try out another service as an alternative. [NewsGator](http://www.newsgator.com) seemed an obvious choice, but the overall feel just didn’t fit right with me.

In my search, I found [Gregarius](http://www.gregarius.net), a free, web-based aggregator that you run on your own server. I’ve used [magpie-rss](http://magpierss.sourceforge.net/) before on the [PatrickWard.com](http://www.patrickward.com) site before but I never considered running my own feed aggregator for myself. Gregarius uses magpie, but does so much more.

It has a nice, ajaxian style that lends itself to a very efficient method of reading through the various posts. Coupled with a few of the plugins, such as “Double-Click to Read”, “StickyFlag”, and “Mark Feed as Read”, I’m now plowing through the feeds with a lot less effort than I ever did with bloglines. It’s certainly a lot more effort to set up, but the end result matched my needs better.

I’ve got a couple of plugins in mind that I might contribute soon myself.

Comments (1)

A new beginning…

Seems like this is about the 6th iteration of the austintech.com blog. I’ve had the domain since January 4, 1998. Wow! Of course, the number of posts doesn’t really reflect that; mainly due to the various purposes the site was used for.

Nonetheless, I think it will remain a sort of general collection bin for snippets, reminders, and general notes I keep for my various programming and administrative tasks.

Comments

HOWTO: Make a Network Cable

I recently had the opportunity to run some new network cables at one of our facilities. One of the requirements we ran into included creating new UTP cables and some fixing some old cables that had been run previously.

I quickly realized that I needed a primer on this as I hadn’t done it in ages. Needless to say we weren’t successful at first and some of the attempts were rather wrong (especially on my part). So, to remedy that and to allow some future notes to myself, here’s a quick tutorial on how to make network cables (including cross-over cables).

<

p> Read the rest of this entry »

Comments (2)

Photoshop Tutorials

I’ve been looking into building interfaces for some game ideas lately. Links to some decent tutorial sites follows.

Comments

HTML Named Colors

I found a great reference of named colors for HTML browsers. I’ve included the HTML in the “extended entry” of this post. The original source is at http://halflife.ukrpack.net/csfiles/help/colors.shtml

The full table of web-colors is in the extended portion of this entry.

HTML Named Colors

Comments