Thursday, 4 August 2011
NVU is dead, long live Kompozer
If you used to like Nvu for your web site editing, you'll know its not been updated well, for ever. Now it has a spin off that is more up to date, Kompozer
Sunday, 31 July 2011
Howto Paste text into CroSH Chrome OS Terminal
If you have a ChromeBook, lucky you! On occasion I need to run terminal commands in CrOS's command line. You can do a copy from Chrome browser, but ctrl-v to paste doesn't work.
The answer is to do a three-finger click - ie press your middle three fingers onto the trackpad.
The answer is to do a three-finger click - ie press your middle three fingers onto the trackpad.
Friday, 1 July 2011
How to use HFS Compression for on the fly space saving
OSX Leopard 10.5 and Snow Leopard 10.6 bring a new element to Apple's venerable filing system, HFS.
They introduced a near seamless and transparent feature called HFS Compression where file are transparently compressed on disk, and then de-compressed into RAM as they are loaded.
Basically in the days of super fast CPUs and huge RAM its a tradeoff between disk I/O and other system constraints.
You could also say that it helps Apple offer laptops with smaller SSDs than their platter equivalents because regular files take up typically only about 50% of the space.
OSX manages the compression for system files and applications and speeds loading times because the disk I/O CPU tradeoff is favourable.
What about other files? Well you can play too. There are three options:
Here are some afstool tips:
printout afsctool options and switches
$ afsctool > afsctool.txt
compress a directory:
afsctool -c ~/directory
compress a file:
afsctool -c ~/directory/file.txt
report which files are not compressed:
afsctool -c -l ~/directory
confirm the results of compressing:
afsctool -v ~/directory
the command I use with some useful extra switches:
afsctool -c -m 5242880 -s 5 ~/directory
the "-m" sets the size of the largest file to be compressed. Since the uncompressed file must be held in RAM, there is a tradeoff here. Its the size in bytes, so 5242880 bytes = 5MB. 10485760 = 10MB.
The -s" sets the minimum percentage that must be saved by compressing. The stops you compressing files for which there is no benefit eg media files, jpegs, zips and rars.
Here's the result of compressing a directory of old files:
/Users/directory:
Number of HFS+ compressed files: 87
Total number of files: 98
Total number of folders: 10
Total number of items (number of files + number of folders): 108
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 34519979 bytes / 34.8 MB (megabytes) / 33.2 MiB (mebibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 27890264 bytes / 28.1 MB (megabytes) / 26.8 MiB (mebibytes)
Folder size (compressed): 27902203 bytes / 28.1 MB (megabytes) / 26.8 MiB (mebibytes)
Compression savings: 19.2%
Approximate total folder size (files + file overhead + folder overhead): 28242154 bytes / 28.2 MB (megabytes) / 26.9 MiB (mebibytes)
So I'm saving overall about 20% of the space required which isn't bad for a directory that contains a lot of images and PDFs.
Handily, HFS Compression being very low level plays nicely with pretty much everything else except anything to do with developer tools - for some reason it really doesn't like compressing .c source code files.
So you can combine this with Dropbox to save some local space for all those important files that you don't need very often.
They introduced a near seamless and transparent feature called HFS Compression where file are transparently compressed on disk, and then de-compressed into RAM as they are loaded.
Basically in the days of super fast CPUs and huge RAM its a tradeoff between disk I/O and other system constraints.
You could also say that it helps Apple offer laptops with smaller SSDs than their platter equivalents because regular files take up typically only about 50% of the space.
OSX manages the compression for system files and applications and speeds loading times because the disk I/O CPU tradeoff is favourable.
What about other files? Well you can play too. There are three options:
- Clusters which is a nice GUI built on Apple's compression technologies. It offers background compression, pausing and other nice features.
- Ditto, the file command line management utility can create HFS Compressed files
- afsctool also allows you to manage file compression, and to report on the results.
Here are some afstool tips:
printout afsctool options and switches
$ afsctool > afsctool.txt
compress a directory:
afsctool -c ~/directory
compress a file:
afsctool -c ~/directory/file.txt
report which files are not compressed:
afsctool -c -l ~/directory
confirm the results of compressing:
afsctool -v ~/directory
the command I use with some useful extra switches:
afsctool -c -m 5242880 -s 5 ~/directory
the "-m" sets the size of the largest file to be compressed. Since the uncompressed file must be held in RAM, there is a tradeoff here. Its the size in bytes, so 5242880 bytes = 5MB. 10485760 = 10MB.
The -s" sets the minimum percentage that must be saved by compressing. The stops you compressing files for which there is no benefit eg media files, jpegs, zips and rars.
Here's the result of compressing a directory of old files:
/Users/directory:
Number of HFS+ compressed files: 87
Total number of files: 98
Total number of folders: 10
Total number of items (number of files + number of folders): 108
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 34519979 bytes / 34.8 MB (megabytes) / 33.2 MiB (mebibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 27890264 bytes / 28.1 MB (megabytes) / 26.8 MiB (mebibytes)
Folder size (compressed): 27902203 bytes / 28.1 MB (megabytes) / 26.8 MiB (mebibytes)
Compression savings: 19.2%
Approximate total folder size (files + file overhead + folder overhead): 28242154 bytes / 28.2 MB (megabytes) / 26.9 MiB (mebibytes)
So I'm saving overall about 20% of the space required which isn't bad for a directory that contains a lot of images and PDFs.
Handily, HFS Compression being very low level plays nicely with pretty much everything else except anything to do with developer tools - for some reason it really doesn't like compressing .c source code files.
So you can combine this with Dropbox to save some local space for all those important files that you don't need very often.
Thursday, 16 June 2011
Howto Apply GH1 hack to you Panasonic GF1
This is a collection of links and info from around the Internet.
- Can you hack your GF1?
You need to check the serial number: it seems only if the 3rd digit is a "9" can you be sure it'll take the hack. If 3rd digit is "0"then you need the next digit to be "f" or lower. - Read the beginners guide.
Here's how to do it:
Download PTool 3.36 and PanaFirmware 1.3 for the GH1
Open PTool 3.36
Load 1.3 firmware
Set new settings (MJpeg-Q, MJpeg-T, MJPeg-width, MJPeg-hight, Video-Buffer and Bitrates, Battery)
Save the new Firmware to 1.33 . . . - SD-Card
Place the SD in the GF1, load new Firmware - All the settings are available to us GF1 users, except full HD (1920x1080) because the sensor is not capable of shooting FHD. Consider starting with these.
Sunday, 12 June 2011
OSX: Open With messed up with super long names

Sometime after I installed Photoshop CS5, I notice that after I control-click on a file that Photoshop can open, its all messed up with super long names.
In the screenshot you see I get this for Photoshop CS4. You might ask well why don't I just uninstall PS 4? Well I would, but its part of Creative Studio 4, and I need that for Acrobat and Illustrator. (Oh dear Adobe integrated installer).
The answer is that the applications .plist has too much information.
Two methods to get to the .plist:
1. Find the application, and control-click

and select Package Contents.
2. In the finder, do "command-shift-6" and type (or copy and paste) changing as required
"/Applications/Adobe Photoshop CS4/Adobe Photoshop CS4.app/Contents"
Both of these methods open the correct folder.

You need to open the info.plist, TextWrangler will do, and remove the extra text you see. You should backup the old file first because otherwise Adobe updater will break.
Sunday, 5 June 2011
OSX: suddenly cannot get onto the network / internet
I had a problem where without warning I couldn't get onto the network, internet WiFi, anything. DHCP just wasn't getting an address.
Using my phone to search Google, it seemed the answer was to download the combo updater and run it. Well yeah like I'm going to download a 1Gb file on my phone.
Anyway, turns out that there's a much simpler way: clear your caches
In the finder do shift-apple-g and then type
/Library/Caches
and OK.

When this folder opens, delete EVERYTHING! You might need to supply your password.
Then, same again:
In the finder do shift-apple-g and then type
~/Library/Caches - spot the "~" ?
and OK.

Again, delete EVERYTHING!
and reboot.
Explanation:
If the Macs battery goes completely, the clock gets reset. Even after you reset the clock, the certificates and the firewall get out of sync and suddenly all your applications, including DHCP no longer have network access.
Re-applying the combo updater also resets the firewall, which is why that works.
Using my phone to search Google, it seemed the answer was to download the combo updater and run it. Well yeah like I'm going to download a 1Gb file on my phone.
Anyway, turns out that there's a much simpler way: clear your caches
In the finder do shift-apple-g and then type
/Library/Caches
and OK.
When this folder opens, delete EVERYTHING! You might need to supply your password.
Then, same again:
In the finder do shift-apple-g and then type
~/Library/Caches - spot the "~" ?
and OK.
Again, delete EVERYTHING!
and reboot.
Explanation:
If the Macs battery goes completely, the clock gets reset. Even after you reset the clock, the certificates and the firewall get out of sync and suddenly all your applications, including DHCP no longer have network access.
Re-applying the combo updater also resets the firewall, which is why that works.
Wednesday, 1 June 2011
Howto: Using encfs with DropBox on OSX
If you've been following the controversy on DropBox not encrypting files in the manner they claimed, then you might like to encrypt your files on DropBox yourself.
To do this, whats needed is a way to place files into the DropBox folder already encrypted, but access the files unencrypted. Here's how.
First though, a note.
The files you store in this manner will be encrypted and only on a session by session basis will you access them unencrypted. This means that if you lose your password, you lose you data. Simple as. The unencrypted presentation you get with this Howto is only a presentation: your files are shown decrypted, as soon as you log out, shutdown, the unencrypted presentation dies.
This creates a folder in your Dropbox folder called "encfs" (this is where the encrypted documents will be stored) and a symbolic link in your Documents folder, into which you put the documents you want to be encrypted on DropBox.
The first time you this command you are asked to make a choice:
p is a good option unless you really know what you're doing.
Some more message and you're good to go. You'll notice that you get a new drive on your desktop - this is the decrypted portion.

Doubleclick to open, and also the encrypted folder in your DropBox folder, and you'll see whats happening. To use, drag your files into this UNENCRYPTED folder / drive! They will be magically copied, encrypted into the 'enfs' folder in your DropBox folder.

One thing I noticed is that files take a bit longer to sync, even comparing to unencrypted files that aren't already in DropBox somewhere.
The mounting of the unencrypted folder doesn't happen automatically when you login, so run this command again.
CAVEAT: If you have any programs that auto-start and expect their data to be in the unencrypted folder, make sure this command is run first, else corruption and data loss may results.
Before the command is run, there is no plain text data available, because encFS and MacFUSE are decrypting the copy thats in your DropBox. If you lose the password, you lose your data. The folder created in your Documents folder will be empty.
If you delete this folder, next time you run the command you'll be prompted to create it.
The directory "/Users/user/Documents/encfs" does not exist. Should it be created? (y,n) y
EncFS Password:
You can repeat this process on any computer that is linked to your DropBox account, and you'll be prompted to (re)create this folder.
To do this, whats needed is a way to place files into the DropBox folder already encrypted, but access the files unencrypted. Here's how.
First though, a note.
The files you store in this manner will be encrypted and only on a session by session basis will you access them unencrypted. This means that if you lose your password, you lose you data. Simple as. The unencrypted presentation you get with this Howto is only a presentation: your files are shown decrypted, as soon as you log out, shutdown, the unencrypted presentation dies.
- Download and install MacFuse (file system in user space)
- Download and install encFS for Leopard (works great with Snow Leopard). If this link doesn't work try Google Code - look for "EncFS for Leopard"
- run the command "encfs ~/Dropbox/encfs ~/Documents/encfs"
This creates a folder in your Dropbox folder called "encfs" (this is where the encrypted documents will be stored) and a symbolic link in your Documents folder, into which you put the documents you want to be encrypted on DropBox.
The first time you this command you are asked to make a choice:
- Please choose from one of the following options:
enter "x" for expert configuration mode,
enter "p" for pre-configured paranoia mode,
anything else, or an empty line will select standard mode.
p is a good option unless you really know what you're doing.
Some more message and you're good to go. You'll notice that you get a new drive on your desktop - this is the decrypted portion.

Doubleclick to open, and also the encrypted folder in your DropBox folder, and you'll see whats happening. To use, drag your files into this UNENCRYPTED folder / drive! They will be magically copied, encrypted into the 'enfs' folder in your DropBox folder.

One thing I noticed is that files take a bit longer to sync, even comparing to unencrypted files that aren't already in DropBox somewhere.
The mounting of the unencrypted folder doesn't happen automatically when you login, so run this command again.
CAVEAT: If you have any programs that auto-start and expect their data to be in the unencrypted folder, make sure this command is run first, else corruption and data loss may results.
Before the command is run, there is no plain text data available, because encFS and MacFUSE are decrypting the copy thats in your DropBox. If you lose the password, you lose your data. The folder created in your Documents folder will be empty.
If you delete this folder, next time you run the command you'll be prompted to create it.
The directory "/Users/user/Documents/encfs" does not exist. Should it be created? (y,n) y
EncFS Password:
You can repeat this process on any computer that is linked to your DropBox account, and you'll be prompted to (re)create this folder.
Subscribe to:
Posts (Atom)