Skip to content

Instantly share code, notes, and snippets.

View TuningYourCode's full-sized avatar

Stephan Eicher TuningYourCode

View GitHub Profile
@TuningYourCode
TuningYourCode / gist:06f276dacbd4791404961df899fc9c22
Created March 16, 2017 13:43
[SOLVED-FOREMAN] The single-table inheritance mechanism failed to locate the subclass: 'HostStatus::ExecutionStatus'.
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';
@TuningYourCode
TuningYourCode / cli-config.php
Created May 31, 2017 17:55
Standalone Doctrine Migrations autoload own abstract migration classes
<?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 / merge.sh
Last active June 25, 2024 01:30
munin rrd merge history
#!/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")"