There are 7 articles in this category.

Mac OS X: remove quarantine status from files

Posted on 2011-02-05 08:34:58

On Mac OS X, downloaded files (via Firefox) have an extended attribute on their file permissions, visible by the ‘@’:

[bianca@charon Downloads]$ ls -l Zend*
-rw-r--r--@ 1 bianca  staff   3738873 Feb  4 19:17 ZendFramework-1.11.3-minimal.tar.gz
-rw-r--r--@ 1 bianca  staff  20025817 Feb  4 19:17 ZendFramework-1.11.3.tar.gz

These extended attributes can be shown with xattr:

[bianca@charon Downloads]$ xattr -l ZendFramework-1.11.3-minimal.tar.gz 0000;4cf55482;;|org.mozilla.firefox

OS X sometimes asks whether it’s safe to open these files. To make things worse, unzipping or untarring such a downloaded file applies the extended attribute to all extracted files…

To get rid of it on a per-file basis:

xattr -d FILE

To recursively remove the attribute from all files/directories:

find . | xargs xattr -d
Posted in: Computers, OS X

Deploying midlets to a Nokia phone over Bluetooth

Posted on 2011-01-09 21:09:56

So I had built a lovely little application (midlet) using the Java Micro Edition, and wanted to deploy that to my Nokia 3120 phone. I don’t have a USB cable for connecting my phone to my desktop, I don’t have a data plan so I couldn’t host it somewhere and then download it on my phone, but I do have a Bluetooth-enabled MacBook (on which the Nokia PC Suite doesn’t run).

When browsing the device using Bluetooth file exchange, only the folders available in Media show up. How to get it deployed on my phone in the Apps folder where it belongs?

The answer is simple once you know it:

  1. Attempt to create a folder named ‘Applications’ at the root level
  2. That folder already exists, so the file browser just moves into it
  3. Browse to the folder within applications where you want to drop the app
  4. Upload the .jad and .jar
  5. Done!
Posted in: Computers, Personal

Oracle inequality

Posted on 2010-06-08 19:24:07

While converting a bit of Oracle PL/SQL to Java today, I found this nugget:

if to_number(nvl(r_status.some_field,0)) < 2 or
   to_number(nvl(r_status.some_field,0)) > 2
  -- do something
end if;

Obviously the coder who wrote this has never heard of the ‘<>’ and ‘!=’ operators…

Posted in: Computers, Work

Server backup system

Posted on 2010-01-10 17:52:42

My home server is 10 years old now: it’s running this website, my personal intranet, a svn server and some other websites, and before today I didn’t have any backup system in place. The last backup I have of the data dates back to April 2008, so I decided it was time to have a proper backup system. Particularly since the server is somewhat ageing.

My idea:

  1. Tar and gzip the entire /home folder every night using a cron job. All SVN, MySQL and Apache data is stored in /home (good thing I set it up that way), so that’ll cover everything that might change daily
  2. Every month, make a copy of the entire system, in addition to the daily backup of /home
  3. Copy the .tar.gz backup file(s) to my desktop computer every day. The desktop computer has enough space for storing the backups: the compressed home directory is just over 100MB.

That way, I will lose at most one day of data, which isn’t much of a problem.

Posted in: Computers, Linux

Internet service providers...

Posted on 2009-07-03 14:49:49

Today, my internet connection was suddenly lost: I discovered that while editing a page at this site. No big deal, I thought, just reconnect and be ready to go. After reconnecting, my site was suddenly unreachable, while the rest of the internet seemed available.

So what happened? After a few minutes, I discovered why: my IP address has changed from the good old to a new number… So after more than 7 years of having that same static IP address, I suddenly have to remember a new number, and my first question was: WHY??

My second question was more important, however: is this permanent? If so, I’d have to change the DNS record for this site. So I decided to call the helpdesk of my ISP, which proved to be a waste of time: after going through the lengthy menu (“other”, then again “other”), I got connected to some guy who put me in the queue for the technical department.

The queue turned out to be long, and after 10 minutes I started to push random buttons on the phone to check whether that would help. I’m not sure if it was a coincidence, but after pushing the “1” three times in a row I got a live person at the other end, who told me he didn’t know, but thought it likely that this new IP address would be fixed for now.

So, if you’re reading this, the DNS update has come through…

Posted in: Computers

Microsoft licence agreements

Posted on 2008-12-30 10:19:42

Funny clause I encountered today at work while installing a bunch of software related to Visual Studio 2008: the end user licence agreement of the TFS 2008 power tools included this clause:

You may not:

  • disclose the results of any benchmark tests of the software to any third party without Microsoft’s prior written approval;

Hmm, I wonder why that clause was added. I mean, you have the licence to use the software, which would include running benchmarks on it, right? They’re probably afraid of someone finding out how crappy their tools were programmed.

As a side note, that licence agreement is not valid for me anyway, since there’s no way to print it.

Posted in: Computers, Work

Crashed Windows laptop: Linux to the rescue!

Posted on 2008-11-02 20:33:13

Last weekend, my mum’s family was visiting at our place for mum’s birthday. My little nephew had brought his broken laptop along so that my big nephew could take a look at what was wrong. He had most likely hosed it by downloading lots of stuff from the big bad internet and installing it all, so Windows XP wouldn’t even boot.

After trying it a few times with the Windows XP installation CD, it consistently hung at “Detecting previously installed versions of Windows…”. My big nephew then concluded “broken harddisk: it probably can’t read stuff from it so it hangs”.

My reaction: not so sure, so I got out my Kubuntu “rescue” CD and booted the laptop with it. It took a while to boot up, but when I finally got myself a root prompt, I could mount the harddisk, though with the warning that it had an unclean shutdown. Viewing files on it worked perfectly as well. I thought that maybe the unclean shutdown was causing the XP installation to hang, so we tried it again. No luck.

Finally, I decided to try a little trick: set the partition flag for the windows partition from NTFS to Linux swap; that way Windows will assume the partition contains garbage and not try to detect previous versions of Windows!

Booting up again using the Windows XP install disk… and… it worked! Windows totally ignored the partition and allowed us to delete the Linux swap partition, and create an NTFS one to continue installation.

The end result: Linux saves the day again, and I have one happy little nephew.

Posted in: Computers, Linux