Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephan Eicher TuningYourCode

View GitHub Profile
@TuningYourCode
TuningYourCode / merge.sh
Last active Feb 7, 2018
munin rrd merge history
View merge.sh
#!/bin/bash
$ip_old_munin_server = '192.168.0.200'
mkdir -p /backup/old
for filename in /var/lib/munin/*/*/*.rrd; do
if [ ! -f "/backup/old/$(basename "$filename")" ]; then
echo $filename
ssh $ip_old_munin_server "rrdtool dump $filename" | rrdtool restore - "/backup/old/$(basename "$filename")"
@TuningYourCode
TuningYourCode / cli-config.php
Created May 31, 2017
Standalone Doctrine Migrations autoload own abstract migration classes
View cli-config.php
<?php
$classLoader = require 'phar://doctrine-migrations.phar/vendor/autoload.php';
$classLoader->addPsr4('DoctrineMigrations\\AbstractMigration\\', __DIR__.'/migrations/src/DoctrineMigrations/AbstractMigration');
return new \Symfony\Component\Console\Helper\HelperSet();
@TuningYourCode
TuningYourCode / gist:06f276dacbd4791404961df899fc9c22
Created Mar 16, 2017
[SOLVED-FOREMAN] The single-table inheritance mechanism failed to locate the subclass: 'HostStatus::ExecutionStatus'.
View gist:06f276dacbd4791404961df899fc9c22
root@majestix:~# cat /etc/foreman/database.yml
Use Password from yaml to login:
root@majestix:~# psql -h localhost -U foreman -W
delete from host_status where type = 'HostStatus::ExecutionStatus';