2013-05-24

maxomai: dog (dog)
2013-05-24 08:11 am
Entry tags:

Friday Miscellany!

What better way to start my four-day weekend than with LiveJournal?

maxomai: dog (dog)
2013-05-24 02:41 pm
Entry tags:

#Illinois Concealed Carry Bill (SB 2193) passes House (#guns #2a)

The Illinois House just passed Illinois's Concealed Carry bill, as required of them by a Federal court ruling. Get information from the "horse's mouth" here, but there's a good summary here.

In a nutshell: this bill establishes shall-issue concealed carry rules for Illinois, allows non-residents to obtain concealed carry licenses, and limits what counties and municipalities can do in the way of gun control. Cook County and Chicago cannot ban assault weapons, for example. On the other hand, concealed carry will still be forbidden in a host of public places, including busses and trains.

There's going to be a lot of gnashing of teeth around this bill. The Governor is opposed to this bill, as are the major Chicago newspapers, and I suspect most Chicagoans feel exactly the same way. Frankly, I predict that this bill, should it become law, will have no effect on crime whatsoever. It won't turn Chicago into the Wild West any more than Portland and Seattle are the Wild West today. (Both Oregon and Washington have shall-issue concealed carry laws.)
maxomai: dog (dog)
2013-05-24 03:46 pm
Entry tags:

Creating gzipped tarballs from Mac Finder

Working on open source projects usually requires one to submit patch files and gzipped tarballs to one's compatriots. This isn't a big deal on most UNIX (including Linux) machines. On Windows one can do this with 7Zip, excepting that newlines in Windows are usually represented by \r\n instead of \n. On Macs, one can do this on command line, but it's more Mac-like to do it in Finder.

There are instructions here for setting up just such a service in Finder. Unfortunately it only tells one how to create tarballs, not how to create gzipped tarballs. It also zips normally hidden Mac copy files along with the expected files, which can leave one's compatriots with a mess.

You can fix both of these messes by using the below script instead of the one provided by Mr Miller. All I've done here is change the last line in accordance with this hint. Hope it's useful.

(I know, I know, the code isn't indented. Unfortunately the only way to really ensure indentation in LiveJournal is to play with CSS, and my CSS-fu is weak. You'll have to make it pretty yourself.)


Tarfile="$1.tar.gz"
count=1
cd "${@%/*}"
if [ $# -eq 1 ]; then
while [ -e "$Tarfile" ]
do
let count++
Tarfile="$1 $count.tar"
done
else
Tarfile="Archive.tar"
while [ -e "$Tarfile" ]
do
let count++
Tarfile="Archive $count.tar"
done
fi
COPYFILE_DISABLE=true /usr/bin/tar -chzf "$Tarfile" "${@##*/}"