Skip to content

Instantly share code, notes, and snippets.

@dynamicnet
dynamicnet / myisam2innodb.sh
Created January 31, 2018 14:26
Convert all MyISAM table to InnoDB in a given database
#!/bin/bash
# MySQL info
DB_HOST='localhost'
DB_USER='root'
DB_PSWD='p@ssword'
DB='dbname'
echo "Converting MyISAM to InnoDB"
@dynamicnet
dynamicnet / zend_max_response_size.php
Created March 3, 2016 14:56
PHP Zend_Http_Client, limits the size of downloaded response
<?php
// You have to turn classic PHP errors into Exception, because cURL trigger errors
function exceptions_error_handler($severity, $message, $filename, $lineno) {
throw new ErrorException($message, 0, $severity, $filename, $lineno);
}
set_error_handler('exceptions_error_handler');
$httpClient = new Zend_Http_Client( $Url, array(
"adapter" => "Zend_Http_Client_Adapter_Curl",