mysqldump --all-databases > all_databases.sql
wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb
/** | |
* jQuery plugin for adding hero image background animation | |
* | |
* Zooms, blurs, and fades background image on scroll down. | |
* | |
* @author Cosmo Mathieu <cosmo@cosmointeractive.co> | |
*/ | |
// jquery-ps-background-animate.js | |
/*! |
<?php | |
$file = $file['temp']['file']; | |
$image = new Image($file); | |
$image->save(${filename}, [optional]${quality}); // Use this when moving a file from one location to another. Especially in the case when we upload a file to the server. | |
$image->resize(${width}, ${height}, [optional]${crop}, [optional]${replace}); | |
$image->createThumb(${width}, ${height}, [optional] ${save_path}); | |
$image->getWidth(); | |
$image->getHeight(); |
<?php | |
class FileManager | |
{ | |
const USER_FOLDER = siteData()->userFolder; | |
protected $adapter; | |
public function __construct($adapter) | |
{ |
<?php | |
/** | |
* A PHP json object template for dealing with php and ajax form submissions | |
* | |
* Provides a framework (for lack of better words) for dealing with ajax | |
* form submissions. Provides an example of how the php and JavaScript code | |
* should be formatted. | |
* | |
* @author Cosmo Mathieu <cosmo@cosmointeractive.co> | |
*/ |
<?php | |
// An example of how to generate inpage css for body | |
// Typically saved in a database OR in theme folder as style.custom.css | |
$encodedStyles = json_encode([ | |
'body' => [ | |
'font-family' => '"NeutraText-Book"', | |
'font-size' => '14px', | |
'background-color' => 'rgba(255, 255, 255, 1)', |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php5.6 php5.6-bcmath php5.6-bz2 php5.6-dba php5.6-imagick php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-soap php5.6-xml php5.6-zip | |
sudo a2dismod php5 | |
sudo a2enmod php5.6 | |
sudo service apache2 restart |