find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;
find -name '*.png' -print0 | xargs -0 optipng -o7
<?php | |
/** | |
* Integrate custom post types into Flatsome 3 page builder application using a child theme. | |
* | |
* This will provide: | |
* | |
* 1. Page Builder Editor support for custom post types | |
* 2. Integration with page builder post element components | |
**/ |
<!doctype html> | |
<html> | |
<head> | |
<title>"PHP Encode v1.0 by zeura.com" decoder =))</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<form method="POST"> | |
<h1>Decode tool for <a href="http://www.phpencode.org">http://www.phpencode.org</a></h1> | |
<textarea name="code" rows="10" style="width: 100%" placeholder="Paste code here"></textarea><br /> |
add_action( 'init', function(){ | |
if ( ! is_admin()) { | |
if( is_ssl() ){ | |
$protocol = 'https'; | |
}else { | |
$protocol = 'http'; | |
} | |
/** @var WP_Scripts $wp_scripts */ | |
global $wp_scripts; |
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-connect-test.php | |
$dbname = 'name'; | |
$dbuser = 'user'; | |
$dbpass = 'pass'; | |
$dbhost = 'host'; | |
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
<?php | |
/* | |
DONT FORGET TO DELETE THIS SCRIPT WHEN FINISHED! | |
*/ | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = '[email protected]'; |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location ~* .php$ { | |
deny all; | |
} | |
location ~ ^(index\.php)?$ { |
server { | |
server_name www.cantwo.net; | |
rewrite ^(.*) http://cantwo.net$1 permanent; | |
} | |
server { | |
listen 80; | |
access_log off; | |
# access_log /home/cantwo.net/logs/access_log; | |
error_log off; | |
# error_log /home/cantwo.net/logs/error.log; |
# A heavily customized VCL to support WordPress | |
# Some items of note: | |
# Supports https | |
# Supports admin cookies for wp-admin | |
# Caches everything | |
# Support for custom error html page | |
vcl 4.0; | |
import directors; | |
import std; |
<script>
jQuery(function($) {
$('body').hide();
$(window).load(function(){
$('body').show();
});
});
</script>