Skip to content

Instantly share code, notes, and snippets.

View longtailventures's full-sized avatar

longtailventures

View GitHub Profile
in router file:
$slimApplication->get(
'/demo/control',
'controllers.ad:demoAction'
)
->setArgument('mode', 'control')
->setArgument('demoIndex', null)
->setName('controllers.ad:demoAction');
https://linuxconfig.org/sendmail-unqualified-hostname-unknown-sleeping-for-retry-unqualified-hostname
Operating System: Linux Solution: sendmail is searching for a FQDN ( fully qualified domain name ). In our case the host name is "debian" and that is not a FQDN. To resolve this problem change /etc/hosts: FROM:
127.0.0.1 localhost
127.0.1.1 debian
TO:
127.0.0.1 localhost.localdomain localhost debian
127.0.1.1 debian
@longtailventures
longtailventures / gist:0df3d6a2df3c1efbfb7e7a2add7ebb20
Created July 18, 2018 20:20
pngcrush all .png files in folder
https://www.commandlinefu.com/commands/view/10996/pngcrush-all-.png-files-in-the-directory
find . -iname '*png' -exec pngcrush -ow -brute {} {}.crush \;
sudo du -x / | sort -n | tail -40
sed -i -e 's/^ *//; s/ *$//; /^$/d'
time wget -nv -p -H --delete-after http://petdance.com
time wget -e robots=off --delete-after https://www.cxamp.com/js/main.js
// re: https://blog.smartbear.com/performance/website-performance-measurement-tools-from-brute-force-to-relative-elegance/
php -d xdebug.profiler_enabled=On
php -d xdebug.auto_trace=On
http://thomashamba.ch/xdebug-trace-file-parser.html
@longtailventures
longtailventures / gist:0e576409c45655dea59a78cebe4486c4
Created December 20, 2016 16:59
Codeception: check if form element is marked as error
$I->canSeeElement('^FORM^ .has-error ^ELEMENT^');
@longtailventures
longtailventures / gist:3ea96f1b2230a9f7f9239d646e7777f0
Created December 20, 2016 16:57
Codeception: retrieve random option from select element
$options = $I->grabMultiple(^SELECT_ELEMENT^ option', 'value');
$I->selectOption('select', $options[array_rand($options)]);