This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Backup | |
| docker exec CONTAINER mysqldump -u root --password=root DATABASE > backup.sql | |
| docker exec CONTAINER mysqldump -u root --password=root DATABASE | gzip > backup.sql.gz | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER mysql -u root -pPASSWORD DATABASE | |
| gunzip < backup.sql.gz | docker exec -i CONTAINER mysql -u root -pPASSWORD DATABASE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| F = 800 // Punktedifferenz zweier Teams, bei der das Stärkere Team keine Punkte mehr gewinnen kann (Anpassbar) | |
| K = 40 // Maximaler Punktgewinn (Anpassbar) | |
| S = 1|0 // Spielausgang: 1 => Sieg, 0 => Niederlage | |
| P-alt(A) = (Sp1 + Sp2)/2 // Punkte von Team A bei Spielbeginn | |
| P-alt(B) = (Sp3 + Sp4)/2 // Punkte von Team B bei Spielbeginn | |
| D = P-alt(A) - P-alt(B) | P-alt(B) - P-alt(A) // Punktedifferenz zwischen den beiden Teams | |
| GW = 1/(10^-(D/F) +1) // Gewinnwahrscheinlichkeit | |
| P-neu(A|B) = P-alt(A|B)+K(S-GW) // Neuer Punktestand von Team A bzw. B | |
| Sp-neu(Sp1|Sp2|Sp3|Sp4) = P-neu(A|B) / P-alt(A|B) * Sp-alt(Sp1|Sp2|Sp3|Sp4) // Neuer Punktestand für den einzelnen Spieler | |