Skip to content

Instantly share code, notes, and snippets.

@jellisii
jellisii / pre-commit
Created Nov 8, 2018
PHPUnit for git pre-commit hook
View pre-commit
#!/usr/bin/php
<?php
// output a little introduction
echo '>>>>>>>> Starting unit tests' . PHP_EOL;
// execute unit tests (it is assumed that a phpunit.xml configuration is present
// in the root of the project)
exec('vendor/bin/phpunit', $output, $returnCode); // cwd is assumed here
$yellow = false;
foreach ($output as $line) {
@jellisii
jellisii / 2018-02-07_salt_trace
Created Feb 7, 2018
Salt archive.extracted state error trace
View 2018-02-07_salt_trace
[MYBOX] root@mybox:~# salt-call -l trace state.sls common.rkhunter
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG ] Including configuration from '/etc/salt/minion.d/enviroment.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/enviroment.conf
[DEBUG ] Including configuration from '/etc/salt/minion.d/mysql_connection_info.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/mysql_connection_info.conf
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: mybox
[TRACE ] The required configuration section, 'fluent_handler', was not found the in the configuration. Not loading the fluent logging handlers module.
You can’t perform that action at this time.