Welcome to My Blog
IT related tech tips since 2006Fixing “You have only 184MB of freespace….” on a CentOS7 VirtualBox VM
Just had a CentOS7 VirtualBox VM popup a warning saying I was down to my last few hundred MB of free space. (I installed it as a trial with a 8GB root partition and then started using it as an Apache test VM with heaps of data) The VM is using LVM and XFS. So my VM...
Take Youtube Offline with youtube-dl
If you go here http://rg3.github.io/youtube-dl/download.html and follow the install instructions you can install a utility to allow you to download youtube videos for offline use. <sarcasm> Just make sure you spend enough time watching videos on youtube proper...
Update a table based on the contents of two other tables. MySQL
The goal was to populate the pack_size_id with the correct id number from the pack_size table, based on the mappings in the part-list table. Table 1 (`items`) +-------+--------------+ | code | pack_size_id | +-------+--------------+ | 50004 | 35 | | 50005 | 36 | |...
Different output of Set::combine and Hash::combine
Just had an annoying 1/2 hour trying to get a properly formatted array to pass to a select control in CakePHP In my controller I'm trying to format an array with a Custom field $options = array( 'fields' => array( 'ReportDate.id', 'CONCAT( ReportDate.date, "...
CakePHP: Submit 0 instead of NULL for a database column that doesn’t allow NULLs
Problem: Error: SQLSTATE[23000]: Integrity constraint violation: 1048 column 'inventory_status_id' cannot be null Cakephp returns the above error when I'm trying to POST a removal of an integer from a field. Cause: The form was sending a blank value back to the...
Using gnubarcode to generate a GS1-128 barcode
Tried using the Code 128 options but couldn't get the right out put The trick I found is to use Code 128 raw mode. The caveat is it won't format a nice human readable text label for the barcode you will have to add that your self later (perhaps hack the postscript)....
What is the FNC1 character used for in a GS1 compliant barcode?
At work we ship pallets to supermarkets. Each pallet needs two bar codes A Serial Shipper Container Code (SSCC) and An item information bar code with GTIN-14 (Trade unit), Best before date, batch and quantity per pallet. On both the SSCC and item information bar code...
Implementing <<first and last>> links in cakephp pagination
I don't know why they don't include them by default but here is an example of how to add first and last links to your view. <?php echo $this->Paginator->first('<< first'); #add this echo $this->Paginator->prev('< ' . __('previous'), array(),...
Understanding the Difference between Windows Server User and Device Clients Access Licenses (CALs)
Every time I ask myself the question which type of CAL do I require? It always seems to take some thought in order to comprehend the difference.... Especially when you only ask the question every couple of years. But I found this picture which helps visualize the...