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
| # More resilient slave crash recovery | |
| master-info-repository = TABLE | |
| relay-log-info-repository = TABLE | |
| relay-log-recovery = ON | |
| sync-master-info = 1 | |
| sync-relay-log-info = 1 |
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
| # encoding: utf-8 | |
| import mock | |
| class smtplib(object): | |
| pass | |
| @mock.patch.object(smtplib, "sendmail", create=True) |
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
| #!/bin/bash | |
| # | |
| # Powerdns sometimes will stall and keep two pipe backend processes | |
| # for no apparent reason, and fill the logs with "Unable to bind to UDP socket" | |
| # events. When that happens, then DNS service becomes unresponsive and | |
| # doesn't answer queries. | |
| # | |
| # This script tries to detect such condition and will exit with a | |
| # high status code (> 90) or zero if everything looks good. | |
| # |
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
| import math | |
| class Shortener: | |
| """ | |
| Simple class to shorten URLs, or rather, numerical IDs. | |
| Each URL must be saved to a database, with the data about source, | |
| category, country, publisher, etc... The database will give back | |
| a numerical ID. We're using that ID to convert it to a base 62 | |
| number and using a symbol table, converting it to a sequence |
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
| We're using graphite 0.9.12. | |
| We have per-datacenter aggregates and total-across-datacenters | |
| aggregates, constructed as follows (flush interval is 10s): | |
| # Total | |
| <project>.<env>.aggregates.total.recommender.api.suggestions.rate (10) = sum <project>.<env>.*.*.counters.recommender.api.suggestions.rate | |
| # Per-datacenter | |
| <project>.<env>.aggregates.dc.<datacenter>.recommender.api.suggestions.rate (10) = sum <project>.<env>.<datacenter>.*.counters.recommender.api.suggestions.rate |
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
| #!/usr/bin/perl | |
| =head1 NAME | |
| rtail - tail multiple files remotely | |
| =head1 SYNOPSIS | |
| ./rtail --host h1 --host h2 --command 'tail -f /var/log/syslog' | |
| ./rtail --user someuser --host h1 --host h2 --command 'uname -a' |
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
| perl6-lwp-simple $ ufo | |
| No such method 'split' for invocant of type 'CompUnitRepo::Local::Installation' | |
| in sub mkpath at /home/cosimo/.perl6/2014.05-118-ge88e462/bin/ufo:161 | |
| in sub get_prefix at /home/cosimo/.perl6/2014.05-118-ge88e462/bin/ufo:148 | |
| in sub MAIN at /home/cosimo/.perl6/2014.05-118-ge88e462/bin/ufo:69 | |
| in block at /home/cosimo/.perl6/2014.05-118-ge88e462/bin/ufo:221 |
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
| #!/bin/bash | |
| # pre-commit hook to syntax check puppet manifests and erb templates | |
| # at checkin. | |
| # Stig Sandbeck Mathisen <ssm@fnord.no> | |
| # | |
| # Modified to run with puppet < 2.7 as well, Cosimo 13/Dec/2011 | |
| # | |
| # Requirements: |
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
| " Vim compiler file for Python | |
| " Compiler: Style checking tool for Python | |
| " Maintainer: Oleksandr Tymoshenko <gonzo@univ.kiev.ua> | |
| " Last Change: 2014 Feb 12 (Cosimo) | |
| " - Removed the pylint rate parsing and display | |
| " - Fixed errorformat for current Pylint versions | |
| " Version: 0.6-dev | |
| " Contributors: | |
| " Artur Wroblewski | |
| " Menno |
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
| class mycompany::admins::cosimo { | |
| realize( Group['devops'] ) | |
| mycompany::admin { 'cosimo': | |
| gid => 2002, | |
| fullname => 'Cosimo', | |
| group => 'devops', | |
| } |