Skip to content

Instantly share code, notes, and snippets.

@jellisii
jellisii / 2018-02-07_salt_trace
Created February 7, 2018 16:20
Salt archive.extracted state error 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.
@jellisii
jellisii / pre-commit
Created November 8, 2018 15:50
PHPUnit for git pre-commit hook
#!/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) {