A tool to create mysql server backups and optionally compress them and save them on a remote S3 server.
It is built on top of mysqldump
, gzip
and aws-shell
.
Run with -h
for for help / usage information:
sh mysql-backup-s3.sh -h
<?php | |
use \Psr\Http\Message\ServerRequestInterface; | |
use \Psr\Http\Message\ResponseInterface; | |
use \Charcoal\Action\ActionFactory; | |
// ... | |
$app->get('api/v1/{action:.*}', function(ServerRequestInterface $request, ResponseInterface $response, array $args=null) { | |
$action_ident = 'alert/action/api/v1/'.$args['action']; |
App | |
->setup() | |
->setupConfig() | |
->setupLogger() | |
->routeManager()->setupRoutes() | |
[ | |
->setupTemplates() | |
->setupActions() | |
->setupScripts() | |
->setupRoutables() |
<?php | |
$view = new Presenter([ | |
'id', | |
'foo' => [ | |
1, | |
':id', | |
':foo' | |
], | |
'bar' => 'This is an hardcoded string', |
#!/bin/bash | |
print_help() { | |
echo "# optimize-images.sh"; | |
echo "# Optimize all images in a given directory (recursively) with jpegoptim and optipng."; | |
echo "#"; | |
echo "# USAGE"; | |
echo "# optimize-images.sh --width=MAX_WIDTH --height=MAX_HEIGHT --dir=DIR"; | |
echo "#"; | |
echo "# PARAMETERS"; |
JsonSerializable
(jsonSerialize()
)active()
raw()
data()
Iterator
/ Traversable
type()
items()
conjunction()
# Enable static cache on index (home) page | |
DirectoryIndex static/index.html index.php | |
RewriteEngine On | |
<IfModule mod_vhost_alias.c> | |
RewriteBase / | |
</IfModule> | |
# Redirect Trailing Slashes If Not A Folder... |
<?php | |
namespace Charcoal\Admin\Script\Tools; | |
use Exception; | |
use Psr\Http\Message\RequestInterface; | |
use Psr\Http\Message\ResponseInterface; | |
use Pimple\Container; |
@@ -0,0 +1,45 @@ | |
<?php | |
namespace Charcoal\Model\Service; | |
use DateTime; | |
use DateTimeInterface; | |
use Exception; | |
use InvalidArgumentException; |