Update: Apparently systemd controlled services perform some sort of /tmp redirection. See below Weird problem Can't find mysql OUTFILE when writing it to /tmp I was using this mysql client command: SELECT A, B INTO OUTFILE '/tmp/result.txt' FIELDS TERMINATED BY ','...
James McDonald
PHP is Sometimes Insensitive
I have been trying to learn CakePHP which is a Model View Controller PHP development framework. But in the process I'm having to learn PHP and have discovered some interesting stuff. My first ow wow that's interesting moment was that class and function names are...
CakePHP 2.2.2 ./Console/cake: line 31: exec: php: not found
Problem: When trying to run the Cake 2.x Console you get the following error ./Console/cake: line 31: exec: php: not found Cause: PHP installed in non-standard path Solution: Add the the path to your php binary to the the path to the top of your cake ./Console/cake...
Google Mail Numeric Code: 7 when “User Agent Switcher for Chrome” is Installed
Problem: Just got an error returned when trying to access GMail from Google Chrome: "Temporary Error (404m)", "your Gmail account is temporarily unavailable" , "Numeric Code: 7" Cause: Using the "User-Agent Switcher for Chrome" for to test a mobile website I'm...
Configure CakePHP 2.x to Detect and Serve Mobile Browser Pages
Put here for later: http://madething.org/post/661607317/mobile-browser-detection-and-optimization-in-cakephp http://doctorfox.wordpress.com/2012/05/28/mobile-browser-detection-and-optimization-in-cakephp-made-simple/ Only thing needing to be added would be a cookie...
Convert XCF to PNG using xcftools and PHP ImageMagick Binding
An sample image (originally in GIMP xcf format): Becomes: Using: <?php $xcf2png = '/usr/bin/xcf2png'; $xcf_file = 'gimp_sample.xcf'; $jpg_file = 'gimp_sample.jpg'; $png_file = 'gimp_sample.png'; $tiled_file = 'gimp_tiled.png'; $cmd = $xcf2png . ' ' . $xcf_file . '...
Including jQuery scripts just before the closing body HTML tag in CakePHP 2.2.2
In your view file app/View/Controller/view.ctp or at the top of your layout app/View/Layouts/layout.ctp put $this->Html->script( 'jquery.min', array( 'inline' => false, 'block' => 'script_bottom' ) ); # or multiple scripts $this->Html->script( array(...
Perl Script to Convert a Progress Table Dump file to a CIM Load File
Ran into a problem trying to load a .d file with the progress editor. I think there was a unique index on the first first field of the msg_mstr table so I had to update the records using CIM from inside QAD. This is the script I used to convert it from .d format to...
Whereis.com Zoom Level to Legend Scale Mapping
Adding to my similar post about Google Zoom to Map Legend Mapping
Associating File with an Application in Gnome 3
I have installed a program named OCRFeeder to be handle using tesseract. OCRFeeder saves files with a .ocrf extension of application/zip mime-type. By default you associate mime-types to applications the problem is the OCRFeeder files are recognized as application/zip...
