jwallace.us

tech, tunes, and other stuff

ProGuard on OSX

ProGuard is a great Java bytecode obfuscator.  Its also free.  To get it working on OSX there are only a couple of things you need to do.  Open a Terminal (I prefer iTerm) and execute the following commands:

1
2
3
cd $JAVA_HOME/lib
sudo ln -s ../../Classes/classes.jar rt.jar
sudo ln -s ../../Classes/jsse.jar .

Also, if you are going to be signing any JAR files, be sure to do that after running ProGuard.  Running the jarsigner on the JAR file before obfuscating it with ProGuard might cause a ClassNotFound exception when trying to run your applet or application.

Removing “Where From” Data From Files in OSX

You might not be aware of this, but if you download a file in OSX using Safari or iChat, OSX will store where you downloaded it from into the file’s metadata.  This metadata is copied with the file itself anytime you copy the to a device such as an MP3 player, a USB thumb drive, etc…  This may or may not be important to you, but if it is read on…  How to get rid of that metadata isn’t very obvious,  but it can be done.   Let me give you an example.  I downloaded an MP3 file from Amazon.  When in Finder,  if I click on the file & choose “More Info” the following is displayed:

"Where from" Metadata: Yikes!!

Notice in the “Where From” section it actually shows my order ID from Amazon.  I like my privacy, and this is simply unacceptable to me.  You might wonder why you would want to delete this information?  Ok.  Suppose you have an MP3 file that you purchased from Amazon on an MP3 player, and that MP3 player gets lost or stolen.  Suppose someone else now has your MP3 player, and decides to distribute all of your music around to friends and the internet.  Suppose this person gets arrested for copyright violations, and the RIAA sees that some of the music originally belonged to you.  Suppose the RIAA then decides to sue you into the dirt.  Comprenez-vous?

The solution is to remove the meta data with the following command:

xattr -d “com.apple.metadata:kMDItemWhereFroms” ./”01 – A Message To You Rudy (2002 Digital Remaster).mp3″

That will get rid of it.

You can confirm the metadata removal by issuing the command:

mdls ./ “01 – A Message To You Rudy (2002 Digital Remaster).mp3″

Getting Chromium to Run in Slackware

First you need to download the latest build of Chromium from the Chromium project. You can get that here: Chromium Dev Build

Usually Chromium is built several times a day, so don’t be surprised to see new versions being dropped in there very frequently.  Download the chrome-linux.zip file, and decompress it into whatever directory you like.

Next, you will need a few additional libraries. Since Slack doesn’t come with these libraries, I just grabbed them from Firefox. If you don’t have Firefox, just download the latest version & use those. The specific files you need are:

  • libnss3.so
  • libnssutil3.so
  • libsmime3.so
  • libplds4.so
  • libplc4.so
  • libnspr4.so
  • libnspr4.so

There are also a couple of other files you’ll need:

  • libgconf-2.so.4.1.5
  • libORBit-2.so.0.1.0

I grabbed the last two files form an installation of Ubuntu that I have on a little netbook.  I placed all these files into my /usr/local/lib directory, and placed the following links to them in /usr/lib:

1
2
3
4
5
6
7
8
ln -s /usr/local/lib/libnss3.so /usr/lib/libnss3.so.1d
ln -s /usr/local/lib/libnssutil3.so /usr/lib/libnssutil3.so.1d
ln -s /usr/local/lib/libsmime3.so /usr/lib/libsmime3.so.1d
ln -s /usr/local/lib/libplds4.so /usr/lib/libplds4.so.0d
ln -s /usr/local/lib/libplc4.so /usr/lib/libplc4.so.0d
ln -s /usr/local/lib/libnspr4.so /usr/lib/libnspr4.so.0d
ln -s /usr/local/lib/libgconf-2.so.4.1.5 /usr/lib/libgconf-2.so.4
ln -s /usr/local/lib/libORBit-2.so.0.1.0 /usr/lib/libORBit-2.so.0

Notice the odd filename extensions that Chromium wants. What is a 1d file?  Anyway, if you followed these directions then you should be able to run Chromium on Slackware.

Once you have Chromium up & running, why not get some themes or extensions to make Chromium look and work just the way you want it to?

If you aren’t running Linux, and you wish to try Chromium you can find all of the development builds here.

Contact App Fixed

I fixed the contact form here on this web site.  It was working fine until I changed domains last month, which (unknown to me) had broken its functionality.  The problem was that I had some stuff hard coded in the Contact application’s Flex code, and I also needed to change some system permissions in some PHP code that the Flex (Flash) based form uses.  Now its all working as it should.

Which Flash Version?

Adobe Flash is the audio/video technology behind many web sites such as YouTube, and it is important to keep your Flash current. The reason for this is that Flash is increasingly a target of computer security exploits, and theoretically the latest version will have the best security. So how do you find out the Flash version installed on your computer to see if it is the current version? Its easy. Adobe has a test page to give you that information here:
Version test for Adobe Flash Player

Drupal: Fixing the “Cron Already Running” Problem

When trying to run a status report in Drupal you might get the error: “Attempting to re-run cron while it is already running.” in your logs. The best way I’ve found to fix the problem, is to go into the Drupal includes directory, and edit the common.inc file. Look for the following code (at line 2667 in Drupal 6.15):

// Fetch the cron semaphore
$semaphore = variable_get('cron_semaphore', FALSE);  

Change it to the following and re-run the status report:

// Fetch the cron semaphore
// $semaphore = variable_get('cron_semaphore', FALSE);
$semaphore = FALSE;

This will allow the status report to run without the previous error. After the status report finishes, change the code back to the way it was & you’re done.

cd2mp3.sh Bash Script

cd2mp3.sh is a little script I wrote to aid in using LAME.  It works in both OSX and Linux.

Here is the help screen:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cd2mp3.sh v1.02 - rip CDs to MP3s easily using LAME

Usage: ./cd2mp3.sh [options]

Directives:
   -f <cd folder> (mount point for your media - e.g. /Volumes/Bach)
   -r <artist>
   -a <artist name>
   -y <year>
   -g <genre> (e.g. Rock, Classical, etc..)
Options:
   -q [LAME quality string] (e.g. "-V 1 --vbr-new -q0 --lowpass 19.7")
   -d [disc number] (e.g. -d 3)
   -c [comment]
   -i [image file name]
   -n (no arguments used here - if present LAME will set the track numbers)

Examples:

cd2mp3.sh -r “Ulrich Schnauss” -a “A Strangely Isolated Place” -y 2003 -g “Electronic” -i a_strangely_isolated_place.jpg -f “/Volumes/A Strangely Isolated Place” -n

or in the case of a two disk set, with comments, and a custom quality string:

cd2mp3.sh -r "Ulrich Schnauss" -a "Far Away Trains Passing By" -y 2005 -g "Electronic" -i ./far_away_trains_passing_by.jpg -f "/Volumes/Far Away Trains Passing By" -c "Encoded using LAME 3.98.2" -n -q "-V 2 --vbr-new -q0 --lowpass 19.7" -d 2

You can download it here: cd2mp3v102.zip

For Linux, you will need to download cdda2wav first, extract the audio tracks from your audio cd onto your hard disk, and then rip the audio wav files to mp3.

Use the command:

sudo cdda2wav -alltracks -cddb=1 -cddbp-server=freedb.freedb.org -cddbp-port=8880

This will place all the tracks into files such as audio_01.wav, audio_02.wav, etc..

You can then run cd2mp3.sh on these tracks.

A Search Engine That Values Your Privacy

Did you ever consider that you are a product? Your demographics are worth money, and thats one of the ways Google rakes it in. Every  search you perform on Google is recorded in a database with your name on it. Read what the Google CEO thinks about your privacy: here and here

There is a good chance Google knows more about you than you do. Now, I am picking on Google, but almost all of them do this. Yes, I did say almost.

There is one search engine that will not collect and sell information about your web searches: Ixquick

You can read about Ixquick’s privacy policy: here