Tuesday, December 30, 2008

New online backup?

Going through spiceworks the other day, and came across an online backup solution called egnyte. In the little advertisement, it stated unlimited backup. There is one caveat though, which is that there needs to be a minimum of 3 power users added to get it for free. It brings the price up to $45 a month. One other option is to use only one power user and add the unlimited storage for a total of $35 a month. Sounds like a pretty good deal to me, and as long as your data is encrypted, it should be safe.

There is a nice little calculator too.

Some resources for those looking to learn php

There was a new "tutorial" posted on the nettuts website. It isn't a real tutorial but a link to 25 other resources to help you get started if you are learning to program php for the first time. You may want to take a look at that site for more resources too. They also have some nice vids.

Thursday, December 18, 2008

Progressing as an Individual Involved with Business

There was a new post on the business pundit blog that talks about a PMBA or Personal MBA. What I think is good about this program is that it gets people to start thinking about their network and working at making connections with people. It also helps to get the "lingo" down in a more natural way. That is great for all people.

What the program lacks though, is an officialness. There is no degree. There is no accredited program.

So if you are looking for that MBA, by all means get that MBA. If you just want a way to improve your interactions and knowledge in business and maybe work towards that MBA later, by all means, work for that PMBA.

Monday, December 15, 2008

My Wife's New Site

The Coupon Lottery Logo
What kind of a husband would I be if I didn't post a link to my wife's new site. Okay, this post isn't totally altruistic as I worked on the layout and getting it all up and running. So there is a little bit of self promotion there.

The site all started when Lisa, that's my wife's name, got interested in coupons. She found lots of sites that made couponing (i don't know if that's a real word) exciting. So to spread the joy to other people she wanted to make a site that had information about abbreviations and tips to let beginner couponers get in on the fun without being outcast by more experienced ones. She also wanted to give away coupons to spread the fun for free. Out of that was born The Coupon Lottery.

Anyway if anyone wants to check out a site and get more information about coupon uses, the site is up and free to use. There are forums as well.

Friday, December 5, 2008

Service Businesses: Do You Ask Your Clients the Right Questions?

Well today must just be a day for insightful posts or I am just feeling really inspired. But here is a post from the small business trends blog about asking the right questions from clients. This puts more focus on what the client wants and less about what you think is right. And when it all comes down to it, the CLIENT is always right. Right?

Interviewing Programmers

I found this article going through the PHPDevelopers blog. It is one of their better articles that they chose to comment on. I just want to put it here so I can remember it and let other people find it if that is something they are looking for. The starting idea is:
I personally find that asking a coding test of junior programmers is a GREAT tool for helping to evaluate them. Typically just a very simple test, a basic CRUD application. Looking at what they create not only gives you insight into how they think and code (did they do MVC? a simple single .php file? handle web security? etc). It also gives you a great starting point to begin discussions with them in person, asking them about why they did (or didn’t) do certain things.


Those are things that a basic PHP programmer should at least know of.

Friday, November 28, 2008

How Far Spiceworks Has Come

Spiceworks logo
I tried out Spiceworks when it first came out and was disappointed with its very very very long scan and response times, its inability to correctly categorize machines and software, and to top it all off, I had to endure the ads.

Well Spiceworks has come a long way since that first beta edition I tried out and now seems to be coming together to form a great products.

First of all, it was able to find everything on my network within 10 minutes and correctly identify every piece of hardware except for a couple of switches with web interfaces and a PBX. I was blown away by that. In fact, in my first use of the program (way back when) I don't remember it categorizing anything for me. There was one hiccup in my most recent use though, and that was having to reboot a couple computers because WMI wasn't able to get stats. After that everything went perfect.

The new help desk is so useful and easy to read. I stopped using OTRS because I found Spiceworks easier to use and read, and the emails it generates are a lot easier for my users to understand as well. The categories were a not the easiest thing to edit, but one quick search through the Spiceworks community forums revealed the answer.

There are still ads which are one thing that can be annoying, but Spiceworks is a free product. And interestingly enough, it seems to do a pretty good job at targeting the ads. I always seem to find useful ads when I am doing other things.

In conclusion, I'd like to say that Spiceworks is a fine product now and something that I would, and do, use in a production environment. I would recommend it to anyone who wants a simple free way to manage their network resources or who needs a simple help desk tool to help them keep track of their to-dos.

Tuesday, November 18, 2008

Review: 10 Advanced Tips to Improve your Programming

While reading through one of the feeds on PHP programming, I came across an article on advanced tips to improve my programming. I though, it might be a good read with some useful information, so I proceeded to read.

The first comment was great and provided a link to a good article with a SQL injection cheat sheet. With the first tip being very good, I though I was in for a good read.

That is where everything changed. There are some very bad style issues concerning this article. Sure its great if you want to cut down on the amount of code you want to use and make it run a little faster. But realistically you should always use brackets and proper spacing and indentation, as well as comments.

What I got out of this article for good tips:
  1. Use an SQL Injection Cheat Sheet
  2. Know the Difference Between Comparison Operators
  3. Use str_replace instead of ereg_replace and preg_replace
  4. Use isset instead of strlen (who uses strlen?)
It might also be good to use a framework and memcached but that all depends on how big of a project you are working on.

Friday, November 14, 2008

Jquery and google analytics team up to track downloads

While searching for a way to track downloads from my websites I came across this post on how to do it with jquery. Since I use jquery for a few things already I thought it'd be a good match.

I’ve quickly modified gaTracker to utilise the new API and call it’s _trackPageview() method rather than using urchinTracker(). The code is available below:

jquery.gatracker.js (Tracking API version)

It works in exactly the same way as the gaTracker 1.0.1 release, and can be dropped in it’s place, but utilises the new tracking API. Feel free to grab a copy until support gets built into the official release.


The great thing about this plugin is that it loads the ga tracker before adding the onclick events. Apparently this is a requirement by the google analytics api.

Thursday, November 13, 2008

How to hack an MSI to install on an older version of Windows

I sometimes use Windows 2000 and some installers will only install on a higher version of windows. This method isn't an exact science but will sometimes allow you to install MSI's on older versions of Windows.

First of all I use a tool from Microsoft called Orca. It allows you to edit the database information contained inside of an MSI. You should probably generate transforms and use those to install instead of altering the original MSI file.



The first thing you should do is try and install the file using the MSI itself. If it does install, then great, you don't have to do anything. If it gives you an error message such as "This program will only install on Windows XP SP2 or higher", then you should try and edit the MSI file. I'll briefly go through the process of editing the installer for Crystal Reports 2008.

I opened up Orca and did a search for the error message I was getting. I found the error under the "Launch Condition" section of the installer. All I had to do was delete that line then it passed that area of the installer perfectly.

I ended up getting a second error message "PIDKEY passed to installer is invalid. Quit Setup.". All I had to do was search for that message and found that under the "Action" column was "KeycodePassedIsInvalidMsg". So that meant that this was the action applied from some condition. Doing another search for "KeycodePassedIsInvalidMsg" revealed the condition. Turning that condition into an expression that is always false such as "1=2" fixed that error right away.

After fixing that, I was able to install the program on Windows 2000 and it seems to work perfectly. No guarantees though.

Monday, November 10, 2008

Aretta Communications is pretty darn good

I just wanted to say a short blurb on Aretta Communications. I have been using their service for a month now ever since I switched over from sellvoip. I have to say that their service so far has been great with fast communication from their staff on support issues. Their prices are really good with deals on packages (priced by the minute) or straight per-minute-in-6-second-increments pricing.

The prices do end up being more expensive than sellvoip was, but for a service that looks like it will be around a while, it's a small price to pay.

Saturday, October 25, 2008

Microsoft Installer Transforms for Open Office 3.0

It look like Openoffice has made quite a few changes in the newest version. Some of them being graphical and others being functional. Both of the afforementioned changes I would consider improvements.

There is one change that seems to happen with every version that is very annoying. That is the change of the installer. Every version has the installer change just enough so that if you apply the an older MST and the same setup.xcu to the new installer, like in my previous advice, that things just don't work.

Well the same is true of the new version and it looks like some major changes were written for it. The setup now needs to run completely for things to work.

This is just one of the main reasons Microsoft Office is easier to use.

Thursday, October 23, 2008

Trixbox is awesome

I need to tell everybody that trixbox is awesome. A few days ago, I set up a trixbox virtual machine in order to route traffic to a SIP application that wouldn't register correctly with a SIP trunking service.

The configuration was very easy, and after looking at a few blogs because I missed the how to section, everything was up and running. Now, I don't want everyone to think that any idiot can set it up, but it is pretty straight forward and there is a lot of help out there on their forums or other places.

The best thing about it is that it runs Asterisk which is compatible with most SIP trunking services out there as well as SIP devices. It also has a nice clean and easy to use GUI web interface. It makes administering it very easy.

I did run into one bug during my short (so far) usage, and that was logging on to download packages. I had the account set up for the trixbox forums and entered that information into the packages screen and it didn't return any errors or display any success. From browsing around the internet, I found out you have to fill in the registration form for the machine and everything will work.

I will hopefully be replacing our aging PBX system with a trixbox system. Because it is awesome.

Monday, October 20, 2008

SellVOIP.com service

Today I just wanted to post a review of SellVOIP's service. I have to preface the rest of the post by saying "read through the whole post."

Out of the many SIP trunking services I looked at, sellVOIP one was by far the best in terms of features and pricing. They had DID(Direct Inward Dial) numbers in all 50 states and has unlimited minute incoming channels for about $5 a month. Their channels would roll over into a per-minute charge if you went past your subscribed amount. They had an easy to use CDR that I could copy into a spreadsheet to plan for expansions. There was failover routing that could go to voicemail or another PBX. Also the service could be bound to IP. I have to say that this provider made me fall in love with VOIP.

That was great -until- they stopped all support. I had pretty quick support from a person named Alex early on in the service. Timely and he resolved all the problems I had. But at the end, the channels started charging for all incoming calls. I tried to contact their support staff but they didn't respond. This is when I found out there was really no way to reach them but through email. I continued for about a month trying to email them about once a week, all the while searching for a new provider. The money ran out in the account and service stopped.

Their website is still up with links to google checkout to sign up for services. I want to warn anybody thinking of signing up for service, that they might not receive any and just be throwing away money.

I am now working with Thomas Hsieh of SplinterRock who was able to get me an account with Aretta Communications. I'll have to see how that goes. Thanks for the help Tom.

Thursday, October 16, 2008

Launch of Attentionplus.com

I know this won't be big news to probably anybody, but Attention Plus Care has launched a new design of its website. It was a joint effort by Adam Funari and me to bring it all together.

The main changes are:

  • Much cleaner code
    The old design was made of absolutely positioned elements with absolute sized.

  • Much more information
    We added a lot more information and put it in much more intuitive places

  • Updated graphics
    If you saw the old site, you'd know what I meant :)


There are also tools on the back-end for clients and employees to use such as:

  • Checking your schedule

  • Viewing the news

  • Downloading files

  • Providing feedback


If you do happen to check it out, please write back and comment.

Tuesday, October 14, 2008

OpenOffice.org 3.0 released

Just in case anyone missed it the newest stable version of OpenOffice was just released. Everyone must have already heard as the website is down with only links to the downloads. Version 3.0 should be bringing along some new features that help it compete as an office suite. One of the biggest improvements I am looking forward to is the native office 2007 format compatibilities (docx and the like).

One thing I'm hoping for is that there is an easy way to write a group policy to skip the annoying registration screen for the install. If the past is any indication, that will not be the case and there will be a brand new work around. I'll be installing this within a week and will let people know how it went.

Tuesday, September 9, 2008

Firehol get-iana scripts

Wow. I just found one of the best scripts out there for cutting down the amount of Iptables commands that Firehol generates using two little Perl scripts.

First off, let me preface this by saying I am not running Debian and getting aggregate-flim setup and running was a little too difficult. But no matter, perl can be used to pull off the same functionality by aggregating the CIDR records. A big thanks to zwitterion.org.

The first script, list-iana-reserved-ranges grabs all of the IANA reserved address ranges and outputs them.

#!/usr/bin/perl -Tw
# [MJS 22 Oct 2001] List IANA Reserved ranges (for firewall purposes)
# [MJS 3 Mar 2008] IANA reformated document to use /8s and not ranges

use strict;
use LWP;

#
# Download Official IANA document
#
my $ua = new LWP::UserAgent;
my $res = $ua->get('http://www.iana.org/assignments/ipv4-address-space');
$res->is_success or die "HTTP request failed: " . $res->message . "\n";

#
# Print all the /8s.
#
print map { "$_\n" }
$res->content =~ m{ ( \d{3} \/ 8 ) .+? (?: UNALLOCATED | RESERVED ) }gx;

# $Id: list-iana-reserved-ranges,v 1.2 2008/05/17 07:00:42 suter Exp $



The second script, aggregate-cidr-addresses, aggregates all the addresses into larger subnets, cutting down on the amount of lines fed into iptables.

#!/usr/bin/perl -Tw
# [MJS 22 Oct 2001] Aggregate CIDR addresses
# [MJS 9 Oct 2007] Overlap idea from Anthony Ledesma at theplanet dot com.

use strict;
use Net::IP;

## Read in all the IP addresses from <>
my @addrs = map { new Net::IP $_ or die "Not an IP: \"$_\"."; }
map { /^\s*(.*?)\s*$/ and $1; } <>;

## Sort the IP addresses
@addrs = sort {
$a->bincomp( 'lt', $b ) ? -1 : ( $a->bincomp( 'gt', $b ) ? 1 : 0 );
} @addrs;

## Handle overlaps
my $count = 0;
my $current = $addrs[0];
foreach my $next ( @addrs[ 1 .. $#addrs ] ) {
my $r = $current->overlaps($next);
if ( $r == $IP_NO_OVERLAP ) {
$current = $next;
$count++;
}
elsif ( $r == $IP_A_IN_B_OVERLAP ) {
$current = $next;
splice( @addrs, $count, 1 );
}
elsif ( $r == $IP_B_IN_A_OVERLAP or $r == $IP_IDENTICAL ) {
splice( @addrs, $count + 1, 1 );
}
else {
die "$0: internal error - overlaps() returned an unexpected value!\n";
}
}

## Keep aggregating until we don't change anything
my $change = 1;
while ($change) {
$change = 0;
my @new_addrs = ();
my $current = $addrs[0];
foreach my $next ( @addrs[ 1 .. $#addrs ] ) {
if ( my $total = $current->aggregate($next) ) {
$current = $total;
$change = 1;
}
else {
push @new_addrs, $current;
$current = $next;
}
}
push @new_addrs, $current;
@addrs = @new_addrs;
}

## Print out the IP addresses
foreach (@addrs) {
print $_->prefix(), "\n";
}

# $Id: aggregate-cidr-addresses,v 1.3 2008/05/17 07:00:42 suter Exp $


To put everything together, you just need to replace your get-iana.sh script with something that uses the perl scripts, like the following:

#!/bin/bash

tempfile="/tmp/iana.$$.$RANDOM"

perl -Tw "/etc/firehol/list-iana-reserved-ranges" | perl -Tw "/etc/firehol/aggregate-cidr-addresses" >"${tempfile}"

echo >&2
echo >&2
echo >&2 "FOUND THE FOLLOWING RESERVED IP RANGES:"
printf "RESERVED_IPS=\""
i=0
for x in `cat ${tempfile}`
do
i=$[i + 1]
printf "${x} "
done
printf "\"\n"

if [ $i -eq 0 ]
then
echo >&2
echo >&2
echo >&2 "Failed to find reserved IPs."
echo >&2 "Possibly the file format has been changed, or I cannot fetch the URL."
echo >&2

rm -f ${tempfile}
exit 1
fi
echo >&2
echo >&2
echo >&2 "Differences between the fetched list and the list installed in"
echo >&2 "/etc/firehol/RESERVED_IPS:"

echo >&2 "# diff /etc/firehol/RESERVED_IPS ${tempfile}"
diff /etc/firehol/RESERVED_IPS ${tempfile}

if [ $? -eq 0 ]
then
echo >&2
echo >&2 "No differences found."
echo >&2

rm -f ${tempfile}
exit 0
fi

echo >&2
echo >&2
echo >&2 "Would you like to save this list to /etc/firehol/RESERVED_IPS"
echo >&2 "so that FireHOL will automatically use it from now on?"
echo >&2
while [ 1 = 1 ]
do
printf >&2 "yes or no > "
read x
case "${x}" in
yes) cp -f /etc/firehol/RESERVED_IPS /etc/firehol/RESERVED_IPS.old 2>/dev/null
cat "${tempfile}" >/etc/firehol/RESERVED_IPS || exit 1
echo >&2 "New RESERVED_IPS written to '/etc/firehol/RESERVED_IPS'."
break
;;

no)
echo >&2 "Saved nothing."
break
;;

*) echo >&2 "Cannot understand '${x}'."
;;
esac
done

rm -f ${tempfile}



There you have it, updated and compact RESERVED_IPS.

Tuesday, August 26, 2008

OTRS on windows

Today I setup OTRS on a windows server. It's always fun to work with systems designed specifically for *NIX but ported over to be usable on win32 systems.

In all actuality, things went fine and wasn't too difficult to work with. But I did run into a couple problems and thought I'd share them.

Apache config:
The pre-configured apache config that comes with the OTRS windows installer is setup to use /otrs as the home directory and also doesn't use index.pl or customer.pl as the default document. The following are the changes I made to use the base website as the host.

ThreadsPerChild 250
MaxRequestsPerChild 0

ServerRoot "C:/OTRS/Apache2"

Listen 80

LoadFile "C:/OTRS/Perl/bin/perl58.dll"

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule perl_module modules/mod_perl.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so

<IfModule mod_perl.c>
Perlrequire C:/OTRS/otrs/scripts/apache2-perl-startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
</IfModule>

ServerAdmin admin@site.com

ServerName otrs.site.com:80

DocumentRoot "C:/OTRS/otrs/bin/cgi-bin"

<Directory />
ErrorDocument 403 /index.pl
Options FollowSymLinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>

<Directory "C:/OTRS/otrs/bin/cgi-bin">
ErrorDocument 403 /index.pl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options FollowSymLinks ExecCGI
PerlOptions +ParseHeaders
PerlOptions +SetupEnv
Order allow,deny
Allow from all
DirectoryIndex index.pl index.html index.htm default.htm
</Directory>

<IfModule dir_module>
DirectoryIndex index.pl index.html index.htm default.htm
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

ErrorLog logs/error.log
LogLevel warn

<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog logs/access.log common
</IfModule>

<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/OTRS/Apache2/cgi-bin/"
</IfModule>

<Directory "C:/OTRS/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

#------------@@Changes for OTRS@@-------------
Include "C:/OTRS/otrs/scripts/apache2-httpd-new.include.conf"



Aspell
Aspell is a nice feature if you aren't using a browser with built in spell checking. This also doesn't work out of the box. First of all, you need to download it. Then you need to install it making sure the path has no spaces. The default is in the "Program Files" folder, so that won't work. Then you need to go into the SysConfig and change the path to the executable.


Sendmail
The default config for the SMTP mailer uses sendmail. Well, Windows doesn't have send mail. So that was an easy fix in the SysConfig changing from sendmail to SMTP and inputting your SMTP server.

I believe those were all the major changes. One thing I am woried about though is upgrading using the installer. I believe that it will overwrite the files. I guess I'll have to worry about that when the next upgrade comes.

Monday, July 28, 2008

Creating PDFs through PHP

I have some experience using PDFs through a website. What we basically did was take an application, run it through an FDF generator and the results could be shown through a PDF.

How does that work? Well the FDF just stores the data for the input fields in the PDF.

There are so many problems with doing it this way though. The first being that Adobe no longer supports FDFs through their newest versions. Another is that we went through revisions in the application form in what information we took and stored. This meant that any changes in the PDF would alter the information the original FDF had stored. Thirdly, to keep the changes disparate between revisions, we would have to make a copy of the PDF, edit it, and tie all the new FDFs to the new PDF. Great, another 100+MB file to have to store.

What kept me from changing that? The company wanted to keep the PDF format for layout in printing.

What will be the solution (has not been implemented yet) is to generate real PDF's to store the information. That way the original information is preserved in the way that it was created. The tool I found for doing that is TCPDF. One of the best things I have seen about this tool is a large amount of updates. In the past couple weeks, there have already been more than 5 updates. You just gotta love that support.

I have already installed it and tested out the demos and it seems to work fantastically. The next step is to actually implement it.

I think I'll post up some more PHP tools that I like later. Please comment in on ones that you find useful or ones that you hate.

Lexy and The Onion (The princess and the pea?)

About a month ago, two of my favorite sites inked a deal in which Lexy.com will be the distributor of mobile media for TheOnion.com.

Why is this good news?

It means that Lexy is becoming a major player in mobile audio and I get to listen to TheOnion's news shorts on my cell phone.

For those that don't know, TheOnion is where I get all of my real news. Not like those other places like Fox or CNN. Oh wait, did I say real news? I meant real ENTERTAINING news. Anyway, if you haven't checked it out yet, I'd suggest doing that.

Links:
Lexy blog
TheOnion Radio News

Friday, July 11, 2008

What have we learned from the iPhone

Next year when you want to get the newest version of the "hottest" phone around, it might be a good idea to wait a couple days to go buy it.

With the stories of activation servers being down and long lines to wait in, I think things would go a bit smoother after the hustle and bustle dies down a bit.

Tuesday, June 17, 2008

Follow up on AS3 and red5

It is looking like I screwed up and didn't read the documentation properly and I am grabbing the first microphone instead of the default microphone.

I was using


var mic:Microphone = Microphone.getMicrophone();


and instead it should be


var mic:Microphone = Microphone.getMicrophone( -1 );



I think the default should be the default microphone. Doesn't that make sense?

Friday, June 13, 2008

RTMP and Red5, how does it work?

This is just a little question I have.

How do RTMP/RTMPT audio streams work with red5 and Flash 9?

I have been searching around the internet looking for how these transport protocols work, and though I've found little snippets, I haven't found definitive answers. The main aspect that I'm looking at is the interaction between a router/firewall, the external red5 server, and the inner Flash 9 client.

I've done packet traces on a working computer and also a non-working computer using wireshark. It doesn't appear to be blocked by the firewall or router which I know have a problem with RTP. What I have come up with so far is that, on the Flash 9 client, the NetConnection will communicate perfectly, the NetStream seems to initiate, but it won't send any audio packets. Is there something I'm missing in the client?

If anyone has any answers, please feel free to post. I will keep this updated with any progress I find.

Tuesday, June 3, 2008

Open Source Helpdesk Software

I was looking around for some helpdesk software for just me to use to help me organize my tasks. I came across a few different solutions.

OTRS: This is the one that I ended up with. It is perl based, has many enterprise type features, and seems to be updated quite frequently. Another plus is that it has it's own ubuntu package, making it very easy to install. I did run across one bug during the installation where I just had to aptitude the libperl apache module.

OneOrZero: At first glance this appeared to be the one that I wanted. I tested it out and found a few bugs in a short amount of time. On top of that, it looks as though their free version isn't supported any more.

eTicket: This was actually my second choice after OneOrZero. I decided not to go with this php based software because there seem to be some big changes with their managment. I may go back later and look at this though.

Upgrade Fedora Core Through Yum

I just went through upgrading an old machine that wasn't really doing much but didn't want to lose the setup. Found a pretty simple guide that helped me get through it painlessly. Maybe that link can help a few people out.

Recently there was a bug added to the formatting. Hopefully they will fix that soon.

Thursday, May 8, 2008

Red5...just $%@*& work

Disclaimer: The title is just what I was thinking when I came up with compiler errors.

Well Red5 is turning out to be a great product and the price can't be beat. Like any software, though, there are a few bugs that need to be worked out. The biggest thing standing in it's path is a totally broken 0.7.0 release that won't even work out of the box. It's okay though, after searching around for a long while, I came across a fix from their bug reporting system.

It basically involves going back to the working ivy from the 0.6.3 release by replacing the ivy library jar in the lib folder, downloading a revised build.xml and ivyconfig.xml and placing them in your base installation directory, and then building with and. It may seem like an easy fix but I would think they wouldn't let this release out if you can't even run it.

I really want this software to progress so it is everything that Flash Media Server is and more (really it is more already). Just need to get those bugs worked out. So now I just want to say keep up a great project red5 guys, it's coming along great.

Monday, May 5, 2008

Update for Update for Firehol's get-iana.sh script

No, the title isn't a typo. The firehol mailing list received an update from ktsaou, the creator of firehol that the update had already been implemented in the CVS. I just wish that the changes would actually make it to release instead of just sitting inside of a CVS that seemingly no one checks. Enough of my little rant. If you want the updated version, you can get it from the CVS.

Friday, May 2, 2008

Update for Firehol's get-iana.sh script

I didn't notice very quickly but it was brought to my attention through the mailing list for firehol that the IANA Reserved IPs list formatting was updated. So I went through and did a little update to get it working again. This isn't 100% tested so use at your own risk.


#!/bin/bash

# $Id: get-iana.sh,v 1.11 2008/05/02 23:38:31 bdewong Exp $
#
# $Log: get-iana.sh,v $
#
# Revision 1.11 2008/05/02 23:38:31 bdewong
# Updated parsing of ipv4-address-space
#
# Revision 1.10 2007/05/05 23:38:31 ktsaou
# Added support for external definitions of:
#
# RESERVED_IPS
# PRIVATE_IPS
# MULTICAST_IPS
# UNROUTABLE_IPS
#
# in files under the same name in /etc/firehol/.
# Only RESERVED_IPS is mandatory (firehol will complain if it is not there,
# but it will still work without it), and is also the only file that firehol
# checks how old is it. If it is 90+ days old, firehol will complain again.
#
# Changed the supplied get-iana.sh script to generate the RESERVED_IPS file.
# FireHOL also instructs the user to use this script if the file is missing
# or is too old.
#
# Revision 1.9 2007/04/29 19:34:11 ktsaou
# *** empty log message ***
#
# Revision 1.8 2005/06/02 15:48:52 ktsaou
# Allowed 127.0.0.1 to be in RESERVED_IPS
#
# Revision 1.7 2005/05/08 23:27:23 ktsaou
# Updated RESERVED_IPS to current IANA reservations.
#
# Revision 1.6 2004/01/10 18:44:39 ktsaou
# Further optimized and reduced PRIVATE_IPS using:
# http://www.vergenet.net/linux/aggregate/
#
# The supplied get-iana.sh uses 'aggregate-flim' if it finds it in the path.
# (aggregate-flim is the name of this program when installed on Gentoo)
#
# Revision 1.5 2003/08/23 23:26:50 ktsaou
# Bug #793889:
# Change #!/bin/sh to #!/bin/bash to allow FireHOL run on systems that
# bash is not linked to /bin/sh.
#
# Revision 1.4 2002/10/27 12:44:42 ktsaou
# CVS test
#

#
# Program that downloads the IPv4 address space allocation by IANA
# and creates a list with all reserved address spaces.
#

IPV4_ADDRESS_SPACE_URL="http://www.iana.org/assignments/ipv4-address-space"
IANA_RESERVED="IANA\|Future use"

tempfile="/tmp/iana.$$.$RANDOM"

AGGREGATE="`which aggregate-flim 2>/dev/null`"
if [ -z "${AGGREGATE}" ]
then
echo >&2
echo >&2
echo >&2 "WARNING"
echo >&2 "Please install 'aggregate-flim' to shrink the list of IPs."
echo >&2
echo >&2
fi

echo >&2
echo >&2 "Fetching IANA IPv4 Address Space, from:"
echo >&2 "${IPV4_ADDRESS_SPACE_URL}"
echo >&2

wget -O - --proxy=off "${IPV4_ADDRESS_SPACE_URL}" |\
grep -e "${IANA_RESERVED}" |\
cut -d ' ' -f 1 |\
(
last=-1
while IFS="/" read range net
do
range=`expr $range + 0`
net=`expr $net + 0`

if [ ! $net -eq 8 ]
then
echo >&2 "Cannot handle network masks of $net bits ($range/$net)"
continue
fi

if [ $range -gt $last ]
then
echo "$range.0.0.0/$net"
last=$range
fi
done
) | \
(
if [ ! -z "${AGGREGATE}" -a -x "${AGGREGATE}" ]
then
"${AGGREGATE}"
else
cat
fi
) >"${tempfile}"

echo >&2
echo >&2
echo >&2 "FOUND THE FOLLOWING RESERVED IP RANGES:"
printf "RESERVED_IPS=\""
i=0
for x in `cat ${tempfile}`
do
i=$[i + 1]
printf "${x} "
done
printf "\"\n"

if [ $i -eq 0 ]
then
echo >&2
echo >&2
echo >&2 "Failed to find reserved IPs."
echo >&2 "Possibly the file format has been changed, or I cannot fetch the URL."
echo >&2

rm -f ${tempfile}
exit 1
fi
echo >&2
echo >&2
echo >&2 "Differences between the fetched list and the list installed in"
echo >&2 "/etc/firehol/RESERVED_IPS:"

echo >&2 "# diff /etc/firehol/RESERVED_IPS ${tempfile}"
diff /etc/firehol/RESERVED_IPS ${tempfile}

if [ $? -eq 0 ]
then
echo >&2
echo >&2 "No differences found."
echo >&2

rm -f ${tempfile}
exit 0
fi

echo >&2
echo >&2
echo >&2 "Would you like to save this list to /etc/firehol/RESERVED_IPS"
echo >&2 "so that FireHOL will automatically use it from now on?"
echo >&2
while [ 1 = 1 ]
do
printf >&2 "yes or no > "
read x

case "${x}" in
yes) cp -f /etc/firehol/RESERVED_IPS /etc/firehol/RESERVED_IPS.old 2>/dev/null
cat "${tempfile}" >/etc/firehol/RESERVED_IPS || exit 1
echo >&2 "New RESERVED_IPS written to '/etc/firehol/RESERVED_IPS'."
break
;;

no)
echo >&2 "Saved nothing."
break
;;

*) echo >&2 "Cannot understand '${x}'."
;;
esac
done

rm -f ${tempfile}

Thursday, May 1, 2008

Skip Annoying OpenOffice Registration Screen

I just wanted to post about a helpful tip that I came across to skip the registration wizard in OpenOffice.org when installing from an administrative install point. Edit the setup.xcu file in "OpenOfficeInstallDirectory\share\registry\res\en-US\org\openoffice\setup.xcu" to look like the following:


<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data oor="http://openoffice.org/2001/registry" xs="http://www.w3.org/2001/XMLSchema" name="Setup" package="org.openoffice">
<node name="L10N">
<prop name="ooLocale" type="xs:string">
<value>en-US</value>
</prop>
</node>
<node name="Office">
<prop name="LicenseAcceptDate" type="xs:string">
<value>2008-04-29T06:44:17</value>
</prop>
<prop name="MigrationCompleted" type="xs:boolean">
<value>true</value>
</prop>
<prop name="FirstStartWizardCompleted" type="xs:boolean">
<value>true</value>
</prop>
<node name="Factories">
<node name="com.sun.star.text.TextDocument">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>48,67,952,723;4;0,0,0,0;</value>
</prop>
</node>
<node name="com.sun.star.sheet.SpreadsheetDocument">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>180,199,952,723;4;0,0,0,0;</value>
</prop>
</node>
<node name="com.sun.star.drawing.DrawingDocument">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>246,265,952,723;4;0,0,0,0;</value>
</prop>
</node>
<node name="com.sun.star.text.WebDocument">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>139,194,952,723;1;0,0,0,0;</value>
</prop>
</node>
<node name="com.sun.star.presentation.PresentationDocument">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>92,111,952,723;4;0,0,0,0;</value>
</prop>
</node>
<node name="com.sun.star.frame.StartModule">
<prop name="ooSetupFactoryWindowAttributes" type="xs:string">
<value>136,155,952,723;4;0,0,0,0;</value>
</prop>
</node>
</node>
</node>
</oor:component-data>

Monday, April 28, 2008

Flash and client audio recording

Recently, I have been looking at recording audio from an embedded flash program and encoding that onto a server. There are so many different resources out there that it can be confusing. I just wanted to share some of the free and/or open source tools that I have found out there. Please feel free to share any tools that you use.


  • Red5 (Flash Media Server Alternative):

    Red5 is an Open Source Flash Server written in Java that supports:

    • Streaming Audio/Video (FLV and MP3)

    • Recording Client Streams (FLV only)

    • Shared Objects

    • Live Stream Publishing

    • Remoting (AMF)




  • ffmpeg (Media Encoder):
    FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows.


  • Audacity (Audio Recorder/Editor):
    Audacity is free, open source software for recording and editing sounds. It is available for Mac OS X, Microsoft Windows, GNU/Linux, and other operating systems.

Thursday, April 10, 2008

OpenOffice.org is better than Microsoft Office


Well, that is not really true. You still have to consider the type of user that will be using the office suite.

Your typical home user will probably find OpenOffice.org (hereon referred to as OpenOffice) sufficient in everything they have to do. Sure there is a learning curve if they are used to using Microsoft Office, but for the price you really can't beat it. So what is the price? It's free. Yes, that's right, it is open source software created by hardworking people to share with the world. It allows add-ons and extensions as well (although I don't believe many basic users would use this feature.)

But what about in an office setting? That is where my first experience with OpenOffice comes into play. In an office full of Nurses, Caregivers, and other Administrative staff. This is where I believe that Microsoft Office shines and OpenOffice falls short. With so many different staff members performing different duties, everyone uses the office suite differently. Many of them are also using Microsoft Office at home. Some of them don't even use computers at home and what little word processing experience they have, came from Microsoft Office many years ago. Now, the staff members are busy people without time to learn a new piece of software and that's to be expected. They have duties totally different from an IT or computer guy. Then support is a key issue. You need to have someone around that can occasionally show people how to do certain things. Sure the same thing can be said for Microsoft Office, but I have probably had 10-15 times more questions with OpenOffice.

The next problem I have come across in the office setting is deployment through GPO (group policy objects.) I don't know why it is made so difficult to get a proper GPO installation and MSI transform setup for OpenOffice. What I had to do was to scour the Internet looking for MSI settings (or setup settings) that I could change to get it to install without causing headaches for our staff. The first thing I ran into was an article telling me I could edit the XML file in the administrative installation folder. Well it seems that route was deprecated and they made it more difficult to edit. In the end, I had to use Microsoft's Orca software to create a transform. To make a long story short, I spent days configuring and testing the settings just right to get it to install, not create different versions in different directories, not to have first start wizard pop up and people call me when they don't know what to do with it, and to get it to associate with .doc, .ppt, and .xls files correctly. With Microsoft Office, I can use their Custom Installation Wizard to create perfect installs that don't have any annoyances.

So, I have come to the conclusion that neither OpenOffice nor Microsoft Office is better than the other, just different. With non-computer savvy people (the ones that don't want to be hassled with getting to learn new software), I would recommend Microsoft Office for it's ease of use and flexibility. But for some users (the ones that like to experiment and LOVE saving money) OpenOffice is great. Oh, it is also great for the small office that can't afford 30 licenses for Microsoft Office but can afford to have their IT guy solve everyone's problems.

P.S. the picture comes from deleket @ deviantart.com

Friday, March 7, 2008

Playing around with the template

Well today I was playing around with the template to get it to display code better and what you see is the final result. I don't know if anyone will want it but I have uploaded it to google docs.

If you are interested in the template, you can display code by doing the following in the html:

<pre>
Code goes here
</pre>

Thursday, March 6, 2008

Blog Updates and Imagick Help

I have decided to turn my personal blog around and try and focus on some tech "stuff" as it will relate more to my current work.

Recently I found some interesting new tools to work with in PHP.
The first one is Imagemagick and the php plugin, Imagick, written partially by Mikko Koppanen. I will be using this to create previews of PDFs and other files for users to download.

Another interesting tool I have yet to mess around with is ezComponents. I found a reference to this site through Mikkos size. I will use this to make some nice looking graphs that will display stats.

I did find some functions to use in pdt/php ide on the eclipse site written by Nico Ehinger which I republished in plain text on google docs. I have also updated them and it should have all the current functions and constants but no comments or default values, available on google docs.

The following is the code I used to generate the last file:

isInternal() ? 'internal' : 'user-defined',
$class->isAbstract() ? ' abstract' : '',
$class->isFinal() ? ' final' : '',
$class->isInterface() ? 'interface' : 'class',
$class->getName(),
var_export($class->getParentClass(), 1),
$class->getFileName(),
$class->getStartLine(),
$class->getEndline()
);

echo "class " . $class->getName() . " {\n\n";

// Print class methods
echo "//Functions\n";
$methods = $class->getMethods();
foreach ($methods as $method) {
$class_method = new ReflectionMethod($method->class, $method->name);

$parameters = $class_method->getParameters();
$params = array();
foreach ($parameters as $parameter) {
$param_string = '$' . $parameter->getName();
if ($parameter->isPassedByReference()) $param_string = '&' . $param_string;
if ($parameter->isOptional() && $parameter->isDefaultValueAvailable())
$param_string .= ' = '.$parameter->getDefaultValue();
$params[] .= $param_string;
}
$method_params = implode(', ', $params);

//Comments Section
echo "\n\t/**\n";
foreach ($params as $i) {
echo "\t* @param $i\n";
}
if (!count($params)) echo "\t*\n";
echo "\t*/\n";

printf(
"\t%s%s%s%s%s%s function %s ( %s ) {}\n" ,
$class_method->isAbstract() ? ' abstract' : '',
$class_method->isFinal() ? ' final' : '',
$class_method->isPublic() ? ' public' : '',
$class_method->isPrivate() ? ' private' : '',
$class_method->isProtected() ? ' protected' : '',
$class_method->isStatic() ? ' static' : '',
$class_method->getName(),
$method_params
);
}

echo "\n}\n\n";

// Print class constants
echo "//Constants\n";
foreach ($class->getConstants() as $constant_name => $constant_value) {
echo "define('".$class->getName()."::$constant_name', $constant_value);\n";
}
?>