Posted by RichardBronosky on the 11th of June, 2008 at 9:52 am under General.    This post has no comments.

I needed to monitor a government data source for updates. Of course being a government institution, they haven't caught on to the RSS/ATOM concept so the normal tools for this will not work. (There really should be a "Google Alert" option for this.) This is the simple bash script I whipped up to serve the purpose.

 
#!/usr/bin/env bash
# pagecheck.sh - intended to be call via crontab (call with -v for verbose) ##

# If you want to override the standard temp dir, define it here.
export TMPDIR=$HOME/tmp
 
# List the pages you wish to check below, one per line, between the EOFs
pages=`cat < < EOF
http://www.gadoe.org/pea_communications.aspx?ViewMode=0
http://www.gadoe.org/pea_communications.aspx?ViewMode=1&obj=1635
EOF
`
for page in $pages; do
    hash=$(echo "$page"|md5sum |sed 's/[^a-z0-9]//gi')
    basename=$(basename $0)
    name=$basename.cache.$hash
    file=$TMPDIR/$name
    diff=$TMPDIR/$basename.diff
    [[ "$1" = "-v" ]] && echo "Checking $page"
    if [[ ! -f "$file" ]]; then
        file=$(mktemp -t $name)
        echo "Creating cache $file ..."
        curl --stderr /dev/null "$page" > $file
    else
        [[ "$1" = "-v" ]] && echo "Checking against cache file $file ..."
        curl --stderr /dev/null "$page"| diff -u $file - > $diff || (echo -e "Found a change in $page\n"; cat $diff; echo "")
        patch $file $diff
    fi
done
[[ "$1" = "-v" ]] && echo "Done!"
 
# vim:ft=sh

And to run this script every hour, I modify my crontab (via: "crontab -e") and make it look like so:

 
MAILTO=me@mydomain.com
#min    hour    day/m   month   day/w   command
0       */1     *       *       *       /home/rbronosky/bin/pagecheck
 
# vi:syntax=crontab:ts=8:tw=0

Enjoy! I hope someone else finds this useful.

Posted by RichardBronosky on the 13th of May, 2008 at 11:07 pm under General.    This post has one comment.

I posted this as a response to one of many frighteningly uneducated rants about gas prices. Let me be very clear in stating that I am extremely worried about energy costs and its effect on my family. (I have started car pooling 4 days a week and working from home 1 day which is the most my employer will grant.) What I am more worried about is what the dumb masses may do in response to the stress that we are all feeling.

Dan said: "...with all the extra cash being stolen from the consumer..."

Dan, That was a pretty ignorant thing to say. Please post a link to the definition of "stolen" that applies to this situation.

What you must realize is that gouging has nothing to do with profits, it has to do with profit margins.

Let's say your business makes and sells a simple product, like slotted o-rings. You make the product by purchasing non-slotted o-rings and turning them on a lathe. You have brokered a deal with you customers that allows you to have a 10% profit margin. However, a market event has caused the cost of your precursor to double. This means that you must invest twice as much of your capital in the non-slotted o-rings in order to meet your customers' volume demands, which have not changed. Even though you are not selling any more product, you are spending nearly* twice as much each month. (*assuming that you have employees whose wages have not changed) The redeeming factor is that your fixed profit margin of %10 means that your profit nearly* doubled along with the cost of the non-slotted o-rings. At first, your customers will be upset that the cost of your product has nearly* doubled, but when they see the figures they will understand that you are not stealing additional profit. That is, unless your customers are being enticed by politicians/media and your product is a ubiquitous commodity like gasoline.

If you where forced to sell your product at the old price, you would be losing nearly* 40% and would go out of business immediately. If you were forced to lower your profit margin to 5%, you (or your investors) would likely decide that your risk is not worth the reward and choose to invest your capital elsewhere. If your customers' politicians decided to buy votes by promising to levy steeper tax burdens on your "evil profits", you would have to choose to either increase your prices or take profits away from your investors to pay the taxes. If your investors include the pension/retirement investments of virtually every single policeman, fireman, teacher, and anyone else with a lick of sense in this country (as is the case with the oil companies), those taxes on "your profits" actually end up coming out of the very people that the politicians were manipulating in the first place.

These knee jerk solutions to our energy crisis are very dangerous. People like you are going to turn this economic correction/recession into a full blown depression if you get your way. And the socialist politicians will be laughing all the way to the treasury. They will then use the taxes you demanded they take [vicariously] away from you, and use them to implement social programs to provide for you what they feel are your basic needs. From each according to their ability to each according to their need. Of course those with friends in high places will be judged to have greater needs.

Here is an interesting links about profit margins: http://www.gravmag.com/oil.html#dollar

Update: Here is a great article on the matter, that I found after I published this article. http://www.nationalreview.com/comment/taylor200511081818.asp

Posted by RichardBronosky on the 1st of May, 2008 at 10:02 am under General.    This post has no comments.

I hate the "you sign up for our newsletter and we will email you a link to the software that handles our proprietary format which nobody in their right mind should be using" business model of this company. I used to use dodgit.com or dodgeit.com for this, but they seem to be up and down a lot lately. Anyway, I figure if they are going to get access to my gmail address, I'm going to blog about it.

As the following link becomes out of date, feel free to add new links to the comments.

http://my.smithmicro.com/downloads/trials/exp-dl-only.html

Posted by RichardBronosky on the 30th of April, 2008 at 12:18 pm under General.    This post has no comments.

If you've ever tried to copy a scripture from http://biblegateway.com and found that the copyright notice and banner get copied too, this is for you. I have created a Bookmarklet (more about those here) that works on both Firefox and Safari (I don't use MSFT products so I don't know if it works in IE).

Drag this link to your bookmarks toolbar -> BibleGateway Copy Enabled

Many thanks to this thread for saving me a little time.

Posted by RichardBronosky on the 1st of April, 2008 at 12:42 am under Business, General, Ranting and technology.    This post has no comments.

I sent this message to Bank of America today. I think the message needs to get out to more organizations, so let's spread the word.

You need to update your list of supported browsers.

There are several issues here.

  1. Netscape is no longer made by anyone, as stated in this announcement. The most important statement there is "We'll continue to release security patches for the current version of the browser, Netscape Navigator until February 1, 2008", which means that on 2008/02/02 it became a liability to use or recommend the Netscape product. You, as a banking institution, should be concerned about giving advice (browser to use) that if followed could lead to account hijacking.
  2. Microsoft no longer makes nor supports an Internet Explorer browser for Macintosh.
  3. Apple no longer makes hardware capable of running OS 9.

You should be recommending Mozilla Firefox, as does Netscape/AOL, for non-Windows users of the Macintosh, Linux, Unix, and (Free/Open/Net)BSD varieties. Having such outdated information on your website makes you appear to be "behind the curve" on technology and does not garner confidence in future customers. That is a real shame considering that I, as a computer engineer in the internet industry, am very impressed with the display of technology found with Bank of America. The statement made outside your site does not reflect the excellent user experience that is to be found inside.

Screenshot

Posted by RichardBronosky on the 31st of March, 2008 at 4:58 pm under General, Ranting and technology.    This post has 7 comments.

I should start by saying, "I'm going crazy over this now." I'll just get that out of the way.

PC manufacturers are continuing to make computers (desktops, notebooks, ultra-portables, motherboards ATX thru SBC) with VGA ports on them. This is totally ridiculous to do. VGA is an analog output. DVI output is [basically] always actually DVI-I, which carries both analog and digital output. DVI-I can be converted to VGA with an inexpensive passive (no electrical components) adapter. In short, DVI can drive an analog display but VGA cannot drive a digital display.

Why does this matter? Because modern televisions are being made with high resolutions (1920x1080 or 1366×768/1368x768) and no VGA ports. This is perfectly reasonable because those high resolutions require tremendous bandwidth and the analog cables are very prone to interference at those rates. Another consideration is the cost of high resolution Analog to digital converts. It makes no sense to have your video source convert its digital data to an analog signal to be transfered over a highly vulnerable cable, only to be converted back to digital at its destination video display. This brings me to my second point.

All video cards/chipsets start with digital information. They process the information into a digital video signal. The signal is then passed to a D->A converter. Here is where things diverge. The device either:

  1. sends both the digital and analog signals out a DVI port.
  2. trashes the digital signal and sends the analog signal out a VGA port.

Clearly option B is a total waste, and results in the device being worthless for connecting to televisions for use as a PVR, or web surfing device. I am amazed that in 2008 it is still hard to find motherboards with DVI output and it's virtually impossible to search sites like NewEgg and TigerDirect for them.

My intention here is to explain that there is no good reason for putting VGA outputs (exclusively) on computers. I would like to see more people get upset about this so we can influence the market. If I have failed to persuade you, please post a rebuttal so I can revise my argument.

Posted by RichardBronosky on the 20th of March, 2008 at 11:06 am under General.    This post has no comments.

Things I'm tired of googling for...

 
# pragmatic access to system variables
# 1. There are 2 types of system variables GLOBAL and SESSION
# 2. LOCAL is a synonym for SESSION
# 3. SELECT requires "@@[type].[var_name]" syntax, so you might as well use it for SET also.
SELECT @@global.thread_cache_size;
SET @@global.thread_cache_size=16;
 
# Investigating the tables on your DB instance
SELECT table_schema, table_name, engine FROM information_schema.tables WHERE engine != 'MyIsam';
 
# Change password
SET PASSWORD [FOR user] = PASSWORD('some password string')
SET PASSWORD [FOR user] = 'ExistingPasswordHashProbablyFromAnotherServer'
 
# empty all the tables in a schema (from BASH using my MYsql alias which includes the U & P)
schema=elections; MYsql -hdev1 -B -N -e "select concat('delete from ',table_name,';') from information_schema.tables where table_schema='$schema';" | MYsql -hdev1 $schema
 
Posted by RichardBronosky on the 12th of March, 2008 at 9:20 am under General and PHP & Linux.    This post has no comments.

I am moving entries of my old one-liners text file to a web page for easier access.

 
# mount cdrom
[ -d "/mnt/cdrom" ] || mkdir -p /mnt/cdrom; mount /dev/cdrom /mnt/cdrom/
 
# mount a samba/cifs share (hostess is used by vmware in NAT mode)
user=rbronosky; [ -d "/mnt/smb" ] || mkdir -p /mnt/smb; mount -t cifs //hostess/$user -o username=$user /mnt/smb
 
# remove the leading path from a find
find . | sed 's/^..//'
 
# basic bash for-looping
for f in $(cat changed_files.txt) ;do vimdiff trunk/$f branches/iteration3/$f; done;
# if you have spaces in filenames
find . -type f |sed 's/^..//'|while read f; do ls "$f"; done
# or
(IFS=$'\n';for f in $(find . -type f) ; do cat ../Logs2/$f $f>../LogsCat/$f; done;)
 
# version number comparison using the power of the Python standard lib
[ "1" == "$(python -c "from distutils.version import *;print int(LooseVersion('3')>=LooseVersion('2.5.1'))")" ] \
&& echo Yes || echo No
# above is True, below is False...
[ "1" == "$(python -c "from distutils.version import *;print int(LooseVersion('2.3')>=LooseVersion('2.5.1'))")" ] \
&& echo Yes || echo No
 
# basic anonymous cvs
cvs -z3 -d:pserver:anonymous@iterm.cvs.sourceforge.net:/cvsroot/iterm ls
 
# make wget use filenames as suggested by the HTTP header Content-Disposition (requires wget>=1.11)
# http://www.vim.org/scripts/download_script.php?src_id=6328 becomes ps_color.vim
echo -e '\ncontent-disposition=on'>>~/.wgetrc
 
# review all modified file diffs in vim before committing
svn st|sed 's/^M//p;d'|xargs svn diff|vim -
 
### Help dad out via SSH (and telephone) ###
## I configure my router to forward $secret_port to port 22 on my machine.
## Because Ubuntu does not default to having and ssh server, I tell dad to do:
sudo apt-get install openssh-server
## I to tell dad to connect to my computer via:
ssh -p $secret_port -R $secret_port:localhost:22 -N $my_username@$my_router_ip & screen; kill %1
## I connect to his computer via:
ssh -v -p $secret_port $dad_username@localhost screen -x
## Now we are both looking at the same shell.  We can both type and collaborate.
Posted by RichardBronosky on the 11th of March, 2008 at 2:11 pm under General and PHP & Linux.    This post has no comments.

I prefer the apt package manager used by Debian based Linux distributions, but am forced to deal the Red Hat Enterprise Linux professionally. For that, I keep this list handy.

 
###############
## rpm tasks ##
###############

# Get a (sorted) list of install packages
rpm -qa|sort|less
 
# find out what version of samba-client is installed
rpm -qa samba-client
 
# Find out how a certain file got here
rpm -q --whatprovides `locate libmysqlclient.so | sed '1p;d'`
# or
rpm -q --whatprovides `which smbmount`
 
# Extract files from an rpm
mkdir tmp; cd tmp; rpm2cpio ../pkg.rpm | cpio -id 
 
# import a public key to resolve error like:
# Warning: ...rpm: 3 DSA signature: NOKEY, key ID 5072e1f5
key_id=5072e1f5; gpg --recv-keys $key_id; gpg --export -a $key_id > /tmp/$key_id.asc; sudo rpm --import /tmp/$key_id.asc;
# and to verify and clean-up...
rpm -qa | sort | grep pubkey; rm /tmp/$key_id.asc
 
##################################
## yum based package management ##
##################################

# add Fedora epel repository to CentOS
wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-2.noarch.rpm
key_id=217521f6; gpg --recv-keys $key_id; gpg --export -a $key_id > /tmp/$key_id.asc; sudo rpm --import /tmp/$key_id.asc;
sudo yum install epel-release-5-2.noarch.rpm
 
# find out what versions of samba-client are are available
yum search samba-client
 
# install samba-client
yum install samba-client
 
# update an old version of samba-client
yum update samba-client
 
######################################
## up2date based package management ##
######################################

# Get help on using RPM repositories
up2date|less
 
# Get a list of all available packages
up2date --showall > /tmp/up2date.all.txt
 
# Install the package perl-DBD-MySQL from the repository
up2date -i perl-DBD-MySQL
 
Posted by RichardBronosky on the 11th of March, 2008 at 1:08 pm under General.    This post has no comments.

I was having a problem where Adium would not let me speak in group chats. This is quite annoying as it is common practice in my company to use 3-10 way chat with DBAs, SysAdmins, and developers to get a task completed quickly and have a record of the conversations.

I don't know what caused the problem, but I know that reinstalling Adium didn't fix it. I am certain that the problem is the result of moving my ~/Library/Application\ Support\Adium\ 2.0 directory from machine to machine to machine, etc. and trying out lots of plugins.

My goals where:

  1. Save my chat transcripts/logs
  2. Save my 10+ IM accounts so I don't have to re-enter them again
  3. Have a working Adium again

I pulled it off and here is how

# Exit out of Adium
cd ~/Library/Application\ Support
tar cf Adium.tar Adium\ 2.0/
rm -rf Adium\ 2.0/
# Launch Adium
# I do not know if you HAVE to set up an account via the wizard, but I did
tar xf Adium.tar Adium\ 2.0/Users/Default/Accounts Adium\ 2.0/Users/Default/Accounts.plist Adium\ 2.0/Users/Default/Logs

It is important to note that if you have a conversation you need to keep between the time you "rm -rf Adium\ 2.0/" and "tar xf..." (in the same day, because Adium logs are created 1 per contact per day) you will need to create a second tar and merge the log manually. I had to do this with about 12 conversations because I let 2 days go by before I attempted to recover the backup.

Posted by RichardBronosky on the 10th of March, 2008 at 3:59 pm under General.    This post has no comments.

I'm starting to enter that crazy preparation phase as we prepare for baby #2 (second girl) in July. I'm starting wish I would have had the fore-sight years ago to say, "No honey I don't feel comfortable [installing light fixtures/sconces/switches, crown molding, building built-in cabinetry, sewing Roman shades, etc.]"

The 23 year old who wanted to his wife's Super-man is now her Advil-man.

Posted by RichardBronosky on the 10th of March, 2008 at 2:35 pm under Apple, Humor and technology.    This post has no comments.

If you believe that there is a "grand design" to the universe then you must conclude that viruses exist for the purpose of population control. I'm against anti-virus software because I believe it violates the "natural order" of things. If permitted to do so, viruses will restore balance to the wreck that is the current market share prospectus.

Why does mankind always feel the need to "play God"? ;-)

Posted by RichardBronosky on the 18th of February, 2008 at 4:44 pm under General.    This post has no comments.

It's not that I don't RTM. It's just that my skimming sucks!

After I couldn't find this in "man curl", I found this explanation. Then I was able to find "--data @foobar" in the man page.

~/$ history|grep 'man curl'
645 man curl
1325 man curl
1327 man curl
1446 man curl
1456 man curl
1467 man curl
1472 man curl
1509 man curl
1663 man curl
1664 history|grep 'man curl'

Posted by RichardBronosky on the 2nd of May, 2007 at 12:32 am under Business, Code Samples and PHP & Linux.    This post has one comment.

Originally posted: March 1 2005 @ 18:25 ET

Quick Information:
Resume in Open Office format, and doc format
Cover Letter in Open Office format, and doc format
Site samples MTLS.us, Lanier.com, BinaryGeek Smarty Template Demonstration

As a PHP contractor I've had many requests for work samples. I've decided to make a single post to my weblog to satisfy most of the requests that I receive.

Since I primarily develop DB driven applications, the most you could see of these projects is a login screen. I will add (with the client's permission) a reference to a recent project. The client came to me requesting a site that had a Flash/Shockwave feel but without the requirement of a Flash plugin. The client works on several government contracts and wanted something that would stand out from his competition. Since most of the machines used by military personnel are locked down, installing browser plugins would be impossible for many of the sites visitors. Since the business of my client (Chemical Engineering) is rather dull to read about, I chose to use a lot of imagery from the client's research as well as royalty free stock photography. I also incorporated a layout with few straight lines to contrast the "data sheet" look that is so common in the industry. Navigating through this site you will see that the content and imagery change in response to your exploration without the need to click and load a new page. And if you resize your browser window short enough to allow scrolling on one of the pages using the "data layout" you can scroll the page to notice a neat CSS/DHTML trick that produces a 3D optical illusion. The translucent paper appears to be sliding underneath the brushed aluminum page frame which casts a shadow over the text, while the image of the earth below the "paper" stays in place. To clarify, I've attached a screen shot:
This is an animated gif
(My code is thoroughly tested to ensure cross browser compliance.)

The most important thing I do is write DB driven PHP. This is very difficult to demonstrate without allowing access to secured areas, or wasting resources on a demo environment. I can, however, show you the features this client received with their project:

  1. Site layouts developed using Smarty Templates.
  2. Code is clean, well documented, and Object Oriented, as seen here.
  3. "Alternative PHP Cache" and memcached eliminate the overhead of generating pages on the fly.
  4. Client opted for the use of text files rather than a database. (Although I repurpose code to save clients time and money, I am still flexible and am not limited to what I feel is best.)
  5. Client manages their own content using a full featured "Content Management System." You can see a demo of the CMS.
Posted by RichardBronosky on the 6th of March, 2007 at 8:37 am under General.    This post has no comments.

Places like Buy.com are now accepting user comments to the company as well as reviews for other users. The Linux community has been notoriously good about adding notes about Linux compatibility to product reviews. That is getting a lot of attention. But the problem is that before the general Linux user can (or at least should) post Linux related comment, they should have some experience with the hardware.

This is the cool thing about Buy.com's suggestion box: You can make comments directly to the company without having to have experience. I just posted the following comment about the ThinkPad R60 Intel Celeron M 420 1.6GHz:

This would be a great Linux machine if it could be purchased without Windows. There is no reason for a Linux user to spend money on a Microsoft OS. That money could buy extra RAM!

I have a ThinkPad T60 which is very similar to this machine, but has a Core Duo processor. The important thing is that it has ALL INTEL hardware, which means full hardware compatibility and Beryl with no proprietary video drivers.

Posted by RichardBronosky on the 16th of January, 2007 at 11:22 am under General.    This post has no comments.

No time blog. Born 12/16/07 @ 7:47am 8 pounds 9 ounces. Find photos on my flickr page.

Posted by RichardBronosky on the 12th of January, 2007 at 8:57 am under General.    This post has no comments.

A while back I decided to try Writely.com (now owned by Google). The only document I had in Word format was my resume, so I uploaded it. It's not the best way to write/modify a document, but it is pretty interesting and probably the best way to do t on the web.
You can see it here.

Posted by RichardBronosky on the 21st of June, 2006 at 11:04 am under General.    This post has one comment.

For those of you interested in a Samsung SGH-T809 (or other) but cannot buy it because it would require manual contact management (an impossible task for most of us these days). I just sent this message to Samsung via their feedback page http://www.samsung.com/ContactUs/ContactUs.htm and I suggest all of you do the same!

To whom it should concern,
I am on my 5th Nokia phone because I know that I can use the syncing software of my choice with their phones. I am wanting to buy an SGH-T809, but your lack of support for industry standards like SyncML and OBEX is going to force me to buy a Motorola RAZR even though I feel it is a less appealing product.

You need to do you ever it takes to get you phones on this list: http://www.apple.com/macosx/features/isync/devices.html Apple users are passionate, evangelistic, loyal, and tend to have discretionary finances. These are the kinds of customers you want.

I've bought one flat panel television from Sharp this year. ( I'm not lying http://www.gossamer-threads.com/lists/mythtv/users/172854#172854 ) I am in the market for 2 more. I am also in the market for an up-sampling DVD player, camcorder, and color laser printer. Until you embrace my community (educated, demanding, consumers) none of your products will make it into my home, even though you have some beautiful TVs that meet my wife's strict bezel requirements.

Please do yourself a favor and embrace SyncML in your mobile phones. I want to buy your products, but cannot.

--Richard Bronosky

Posted by RichardBronosky on the 4th of June, 2006 at 7:15 pm under General and Personal.    This post has no comments.

First we told Christy's family. Then we told my mother. I announced it a Q100.5. Today I announced it at church, so I guess it's now safe to blog about it.

After 3 years of trying we are finally pregnant!

It's been a long hard journey, which I will describe in detail later. For now I just want to get a post out here so that those who are interested can share in our excitement.

Here is a link to my photos tagged "baby". Until the 2nd week of January these will all be ultrasounds, but we've been asked by many... So enjoy.

Posted by RichardBronosky on the 22nd of May, 2006 at 11:40 am under General.    This post has 6 comments.

The part of speech used in:

I could care less

...is used incorrectly. Unfortunately this is often the case. I see this done all the time and it drives me crazy. As a child I misunderstood the intended meaning for years due to it's frequent misuse. I would often hear "I could care less" and "I couldn't care less". I assumed that they were properly used and that there meaning were opposite. It took me years to discover that the only difference between them, as irony would hold, is that one was used "with care" and one was used "without care".

If you ignore what you understand "could care less" to mean, and evaluate it as if hearing it for the first time you will realize that it is making a statement exactly opposite of what you wish to convey.

In order to do something less, you must currently be doing that something to a magnitude which would allow you withdraw slightly without ceasing all together.

If I am juggling (one handed) three balls in the air, I "could juggle less" by subtracting one of the balls. I would then be juggling two balls. (juggling two balls two handed isn't REALLY juggling.) But at this point I "could NOT juggle less." If I were to remove one of the balls, I would then be tossing one ball in the air, which is certainly not juggling.

So, to convey your message, you must say "could not care less". This literally means one cares none or next to none.

Thank you for listening, and choose your words wisely. (People are judging you by them.)