Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
<?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. |
App::before(function($request) | |
{ | |
$key = Str::slug($request->url()); | |
if(Cache::has($key)) return Cache::get($key); | |
}); | |
App::after(function($request, $response) | |
{ | |
$key = Str::slug($request->url()); |
cd /usr/local/src/ | |
wget http://nginx.org/download/nginx-1.8.0.tar.gz | |
tar -xvf nginx-1.8.0.tar.gz | |
wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz | |
tar -xvf openssl-1.0.2d.tar.gz | |
cd nginx-1.8.0/ |
<?php | |
$server = ''; // MySQL hostname | |
$username = ''; // MySQL username | |
$password = ''; // MySQL password | |
$dbname = ''; // MySQL db name | |
$db = mysql_connect($server, $username, $password) or die(mysql_error()); | |
mysql_select_db($dbname) or die(mysql_error()); |
#show raid status | |
mdadm --detail /dev/md0 | |
lsraid -a /dev/md0 | |
#http://www.tecmint.com/create-raid1-in-linux/ |
mdadm --monitor --mail=root@localhost --delay=1800 /dev/md2 | |
#should release a mdadm daemon to monitor /dev/md2. The delay parameter means that polling will be done in intervals of 1800 seconds. Finally, critical events and fatal errors should be e-mailed to the system manager. That's RAID monitoring made easy. | |
#Finally, the --program or --alert parameters specify the program to be run whenever an event is detected. |
##Управление логгированием в systemd
###Установка времени
Одним из существенных недостатков syslog является сохранение записей без учёта часового пояса. В journal этот недостаток устранён: для логгируемых событий можно указывать как местное время, так и универсальное координированное время (UTC). Установка времени осуществляется с помощью утилиты timedatectl. Просмотреть список часовых поясов можно при помощи команды:
$ timedatectl list-timezones
Установка нужного часового пояса осуществляется так:
find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \; |