Posted
on September 5, 2018, 12:36 pm,
by admin,
under
git.
Use gitk to find out which commit you want to rollback and do the following:
git reset --hard 53c309929253a2a |
Posted
on August 21, 2018, 2:03 pm,
by admin,
under
linux.
Posted
on July 24, 2018, 4:14 pm,
by admin,
under
gimp.
1. click ‘Select All’ and open and edit it
2. When you are about to save, gimp can’t save multipages pdf directly. You’ll need to use an intermediate file format
3. Install ImageMagick
sudo apt-get install imagemagick |
4. Save in Gimp
File -> Export -> document.mng
5. Export to pdf in a command line
convert -reverse document.mng document.pdf |
Posted
on July 3, 2018, 10:37 am,
by admin,
under
bash.
for i in *.png; do mv "$i" "${i/.png/t.png}"; done |
Posted
on June 13, 2018, 2:01 pm,
by admin,
under
php.
$file = 'myimage.png';
$size = getimagesize($file);
$fp = fopen($file, 'rb');
if ($size and $fp)
{
header('Content-Type: '.$size['mime']);
header('Content-Length: '.filesize($file));
fpassthru($fp);
} |
Posted
on May 21, 2018, 10:52 am,
by admin,
under
git.
git checkout -b new_branch_name |
Posted
on May 21, 2018, 9:39 am,
by admin,
under
git.
git push origin --delete feature/login
git push origin :feature/login |
Posted
on May 17, 2018, 8:36 am,
by admin,
under
bash,
linux.
Posted
on May 16, 2018, 11:47 am,
by admin,
under
redis.
Posted
on April 30, 2018, 12:35 pm,
by admin,
under
joomla,
php.
<?php
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../../..' ));
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('administrator');
$mainframe->initialise();
$app =& JFactory::getApplication();
$user =& JFactory::getUser();
if($app->isAdmin() && !$user->id) {
header('Location: /administrator');
exit();
}
?> |