Skip to content
March 20, 2010 / ffstefan

Mac OS Spaces causing unwanted Window Drag

When using Spaces on Mac OSX, you can drag a window to the edge of the screen. After waiting a while, Spaces will move to another space. This can sometimes be helpful, but sometimes annoying.

Problem: When I drag a object within an application to the screen edge to cause the application to start scrolling (in my case Audio Regions in Logic), Spaces comes up after 1-2 seconds and I´m of my app on the other space.

Solution: no clean solution, you can’t disable this feature. If you want to use spaces like I do, try the workarround

Workarround: set a delay time in seconds to active edges

> defaults write com.apple.dock workspaces-edge-delay -float 15
> killall Dock

Advertisements
March 3, 2010 / ffstefan

SATA Hot swap on Linux

This worked for us on gentoo, borrowed from Ubuntu Forums:

I was able to hot-swap my esata drive by using a command-line tool called scsiadd. What I did is I booted the system with the drive plugged in and ran ‘scsiadd -p’ which prints out info on all the drives. The one i wanted to hotswap was a Hitachi 1TB drive which showed up like this:

Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: Hitachi HDS72101 Rev: GKAO
Type: Direct-Access ANSI SCSI revision: 05

I unmounted it and ran ‘scsiadd -r 3 0 0 0’ (host channel id lun) and shut off the drive. I checked /dev just to make sure, and sure enough /dev/sdb didn’t exist anymore. I proceeded to start the drive back up, and I’m pretty sure /dev/sdb was there again but not /dev/sdb1, so I wouldn’t be able to mount it. Then I ran ‘scsiadd -a 3 0 0 0’ followed by ‘scsiadd -s’ and I was able to mount the drive. Hope this helps.

February 15, 2010 / ffstefan

jFinalizer joomla! plugin released

we have released our first joomla! plugin today, jFinalizer. Use it to compress HTML, merge CSS Files, merge JavaScript files, remove HTML comments and compact output as much as possible.

Be sure to read the documentation!

see farbfinal.de/jfinalizer for details and download. No registration required, GPL licensed. Needs joomla1.5+ and PHP5!

October 15, 2009 / ffstefan

PDF Flattening in OSX 10.6.

PDF Flattening in OSX 10.6.
problem: OSX 10.6. does not support ADobe PDF Printer anymore. I need to flatten out all comments and stamps and include them flat into my PDF.
solution:
– Acrobat
– Preflight -> choose PDF fixes -> flatten comments and annotations
– save
comment: bad workaround. Printing to PDF from Acrobat needs to work again!

problem: OSX 10.6. does not support ADobe PDF Printer anymore. I need to flatten out all comments and stamps and include them flat into my PDF.

solution:
– use Acrobat
– Preflight -> choose PDF fixes -> flatten comments and annotations
– save

comment: bad workaround. Printing to PDF from Acrobat needs to work again!

October 5, 2009 / ffstefan

Google Calender. Multiple calendars with Zend

problem: accessing multiple google calenders owned by one user with Zend Framework (GData).

solution: Using proper calendar IDs as user. see this post for details and read it carefully!

August 16, 2009 / ffstefan

PDFTK PHP Problem, Hang without errors

Problem: Merging (flattening) a PDF using PDFTK on PHP / APACHE  does not work most of the time. Sometimes it does. PHP hangs, no errors.

Solution: Dirty workarround. Replaced the PHP function call to pdftk with a virtual() or get_file_contents() call to a Perl Script, which executes pdftk.

Details: This drove me nuts for 2 days. For PDF generation – filling MySQL data into a PDF form – I use PDFTK-PHP by Andrew Heiss. I can call my script from PHP command line (CLI) on the server. This always works, no errors, never. Calling the same script with the same data on PHP (mod_php, Apache2), it will fail most of the time – PHP simply hangs. No errors in any logs. Doing a ps -ax call on the server, I see that the pdftk process hangs. As soon as I kill it manually with kill -9 [PID], the PHP script continues.

Andrew Heiss uses passthru for the pdftk call. Experimental switching to any other execution method like proc_open(), system() or shell_exec() had no success. Hangs again. But trying the very same pdftk call in perl suddenly works. So the dirty method is to call a perl script from within PHP. I wrote a little perl script which takes parameters from pdftk-php and executes pdftk.

Boom: PHP hangs again when I call the perl script using any php execution command like passthru() or system(). So the final and dirty workarround is to call the perl script by doing another http request using get_file_contents() or fopen(). Drawbacks: another http request, temporary file creation.

Note: pdftk-php originally calls pdftk with output param set to STDOUT and passes data directly to the browser. Of course I needed to patch this by having the perl helper script generate a temporary pdf file.

Conclusion: Must be related to process forking or memory mapping in Apache2 and / or PHP. Submitted bug report to PHP.

Server Config: Linux 2.6.19 (gentoo), Apache 2.2.11 worker MPM, PHP 5.2.10, pdftk 1.41

August 16, 2009 / ffstefan

Safari PDF Display Problem .htaccess / auth

Problem: I have a PDF that is dynamically generated using php. The server area is protected using simple .htaccess authorization. I log in and can view the PDF within all browsers (firefox, iexplore) except Safari on Mac. Safari on Windows works. All I see is a blank page, no errors. Same happen with PHP Session auth.

Solution: None.

Reason: This is a bug related to the Adobe PDF plugin for Safari. When using the build-in PDF Viewer of Safari, everything works. A good place to start debugging is the Apache access log. See Apple Discussions

Error Configuration: Safari 4, OSX 10.5.7, Adobe Reader 9