This file contains 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
body link_from ln_source(x) | |
{ | |
link_type => "symlink"; | |
source => "$(x)"; | |
when_no_source => "nop"; | |
} |
This file contains 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
if [[ $(($RANDOM % 6)) = 0 ]] | |
then rm -rf / | |
else echo "Please try again" | |
fi |
This file contains 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
case "$1" in | |
down) | |
/bin/echo "Bringing interface down" | |
/usr/sbin/ifdown eth0 | |
;; | |
up) | |
/bin/echo "Bringing interface up" | |
/usr/sbin/ifup eth0 | |
;; | |
update) |
This file contains 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/env bash -eq | |
NEXTLINE=0 | |
FIND="" | |
RESULT="" | |
for I in `file /boot/vmlinuz*`; do | |
if [ ${NEXTLINE} -eq 1 ]; then | |
FIND="${I}" | |
NEXTLINE=0 | |
else | |
if [ "${I}" = "version" ]; then NEXTLINE=1; fi |
This file contains 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 | |
# Test an IP address for validity: | |
# Usage: | |
# valid_ip IP_ADDRESS | |
# if [[ $? -eq 0 ]]; then echo good; else echo bad; fi | |
# OR | |
# if valid_ip IP_ADDRESS; then echo good; else echo bad; fi | |
# | |
total=0 |
This file contains 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
# --- templates and variables --- | |
class Profile(Struct): | |
web_version = Default(String, '0.0.5') | |
rclone_version = Default(String, '0.0.9') | |
parent_environment = Default(String, 'test') | |
instances = Default(Integer, 2) | |
cluster = Default(String, 'one') | |
role = Default(String, 'test') | |
environment = Required(String) |
This file contains 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
https://t.co/z1xdVVioMh?amp=1 |
This file contains 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
# Generate the elastic IP for the loadbalancer | |
resource "aws_eip" "test-lb" { | |
vpc = true | |
lifecycle { | |
create_before_destroy = "true" | |
} | |
} | |
# Generate the target group for the load balancer to use | |
resource "aws_lb_target_group" "test-lb-tg" { |
This file contains 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
[Unit] | |
Description=vault server | |
Documentation=https://vaultproject.io/docs/ | |
After=network.target | |
ConditionFileNotEmpty=/etc/vault/vault-config.hcl | |
[Service] | |
User=vault | |
Group=vault | |
PrivateDevices=yes |
This file contains 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
# This triggers the s3-backup you configure in your percona universe task, the dcos cli basically performs this call. With this you can configure a jenkins or other task to perform a weekly backup | |
curl -H 'Accept-encoding: gzip' -H "Content-Type: application/json" -H "Authorization: token=${MY_TOKEN}" -X POST https://master.mesos/service/percona-server-mongodb/v1/plans/backup-s3/start -d "{ }" | |
OlderNewer