Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| #!/bin/bash | |
| currentAttempt=0 | |
| totalAttempts=10 | |
| delay=15 | |
| while [ $currentAttempt -lt $totalAttempts ] | |
| do | |
| currentAttempt=$(( $currentAttempt + 1 )) | |
| echo "Attempt $currentAttempt of $totalAttempts..." |
| # How to install: | |
| # pre-commit install --install-hooks && pre-commit install --install-hooks -t commit-msg | |
| # How temporary skip one of hooks: https://pre-commit.com/#temporarily-disabling-hooks | |
| repos: | |
| ####### | |
| # ALL # | |
| ####### |
| # ensure any xen virtual block devices named xvdN get a sdN symlink for consistency | |
| KERNEL=="xvd*", PROGRAM="/sbin/ec2udev-vbd %k", SYMLINK+="%c" |
| ################################################### | |
| ## | |
| ## Alertmanager YAML configuration for routing. | |
| ## | |
| ## Will route alerts with a code_owner label to the slack-code-owners receiver | |
| ## configured above, but will continue processing them to send to both a | |
| ## central Slack channel (slack-monitoring) and PagerDuty receivers | |
| ## (pd-warning and pd-critical) | |
| ## |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Picking the right architecture = Picking the right battles + Managing trade-offs
# uname -a
Linux base 4.0.5-gentoo #1 SMP Wed Jul 1 02:23:16 JST 2015 x86_64 Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz GenuineIntel GNU/Linux# emerge -pvq openldap openssh sssd sudo
[ebuild R ] net-nds/openldap-2.4.38-r2 USE="berkdb crypt gnutls ipv6 minimal sasl ssl syslog tcpd -cxx -debug -experimental -icu -iodbc -kerberos -odbc -overlays -perl -samba (-selinux) -slp -smbkrb5passwd" ABI_X86="(64) -32 (-x32)" | /* global _ */ | |
| /* | |
| * Complex scripted dashboard | |
| * This script generates a dashboard object that Grafana can load. It also takes a number of user | |
| * supplied URL parameters (int ARGS variable) | |
| * | |
| * Global accessable variables | |
| * window, document, $, jQuery, ARGS, moment | |
| * | |
| * Return a dashboard object, or a function |
####sessions
tmux new -s session_name # new session by name
tmux attach -t session_name # attach session by name (you can also use a instead of attach)
tmux switch -t session_name # switch session by name (you can also use a instead of attach)
tmux list-sessions # list existing sessions
bind-key : new -s session_name # new session from within a session
// detach
tmux detach # detach currently attached session
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)