Posted on October 29, 2015, 8:21 am, by admin, under
apache.
1. ls -ltr /etc/apache2/mods-enabled/ssl.load; ls -ltr /etc/apache2/mods-enabled/ssl.conf result: not found 2. sudo a2enmod ssl 3. ls -ltr /etc/apache2/mods-enabled/ssl.load; ls -ltr /etc/apache2/mods-enabled/ssl.conf result: created
Posted on October 26, 2015, 2:58 pm, by admin, under
php.
<?php $start = (float) array_sum(explode(’ ‘,microtime())); // PHP Database Business Logic $end = (float) array_sum(explode(’ ‘,microtime())); print "Processing time: ". sprintf("%.4f", ($end-$start))." seconds.";
Posted on October 23, 2015, 6:44 am, by admin, under
bash,
linux.
Run optipng to optimize png files in directory: for i in `ls`; do optipng -i0 -o7 -zm1-9 $i; done Run optipng for a single file: /usr/bin/optipng -i0 -o7 -zm1-9 upload/banner/kaspi132px.png Run jpegoptim for a single file: /usr/bin/jpegoptim –strip-all upload/banner/kaspi132px.jpg Run gifscle for a single file: /usr/bin/gifsicle -b -O2 upload/banner/kaspi132px.gif
Posted on October 22, 2015, 10:53 am, by admin, under
mysql.
mysqldump -u -p db table1 table2 table3
Posted on October 14, 2015, 8:26 am, by admin, under
yii.
Edit config/main.php (or config/web.php), add or remove the following code: $config[‘bootstrap’][] = ‘debug’; $config[‘modules’][‘debug’] = ‘yii\debug\Module’;
Posted on October 10, 2015, 8:09 pm, by admin, under
mysql.
mysqlcheck -c databasename -uyourusername -pyourpassword
Posted on October 9, 2015, 8:29 am, by admin, under
git.
If you want to rename a branch while pointed to any branch, simply do : git branch -m oldname newname If you want to rename the current branch, you can simply do: git branch -m newname