Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
#!/bin/sh | |
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz | |
tar xfvz mysql-5.6* | |
echo "stopping mamp" | |
sudo /Applications/MAMP/bin/stop.sh | |
sudo killall httpd mysqld | |
echo "creating backup" |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
// Lock down PHP execution in that particular directory. | |
<Files *.php>deny from all</Files> |
This gist assumes:
<?php | |
abstract class WPAS_Model { | |
static $primary_key = 'id'; | |
private static function _table() { | |
global $wpdb; | |
$tablename = strtolower( get_called_class() ); | |
$tablename = str_replace( 'wpas_model_', 'wpas_', $tablename ); | |
return $wpdb->prefix . $tablename; | |
} | |
private static function _fetch_sql( $value ) { |
<?php | |
## Function to set file permissions to 0644 and folder permissions to 0755 | |
function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){ | |
$d = new RecursiveDirectoryIterator( $dir ); | |
foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){ | |
if( $path->isDir() ) chmod( $path, $dirModes ); | |
else if( is_file( $path ) ) chmod( $path, $fileModes ); | |
} |
<? | |
extension_check(array( | |
'curl', | |
'dom', | |
'gd', | |
'hash', | |
'iconv', | |
'mcrypt', | |
'pcre', | |
'pdo', |
git config --global http.postBuffer 524288000