This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/public/; | |
optimize() { | |
jpegoptim *.jpg --max=90 --strip-all --preserve --totals | |
optipng *.png; | |
for i in * | |
do | |
if test -d $i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# firewall settings | |
### BEGIN INIT INFO | |
# Provides: firewall | |
# Required-Start: $remote_fs $syslog $network | |
# Required-Stop: $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: iptables firewall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ImageOptimize extends Command { | |
/** | |
* The console command name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildDependenciesTree() { | |
$composer = json_decode((string)(file_get_contents(app_path().'/../composer.json'))); | |
$installed = json_decode((string)(file_get_contents(app_path().'/../vendor/composer/installed.json'))); | |
$tree = Array(); | |
foreach($composer->require as $lib => $version) { | |
// skip PHP and other non lib requirements | |
if (!is_dir(app_path().'/../vendor/'.$lib)) | |
continue; | |
$tree[] = loadDependencies($installed, $lib); |