Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#!/bin/bash | |
docker rm $(docker ps -q -f status=exited) | |
docker rmi $(docker images -q -f dangling=true) |
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround | |
Install `redhat-rpm-config` | |
$ sudo dnf install redhat-rpm-config |
from checks import AgentCheck | |
class LinuxEntropyCheck(AgentCheck): | |
def check(self, instance): | |
with open('/proc/sys/kernel/random/entropy_avail', 'r') as procfile: | |
data = procfile.read().strip() | |
self.gauge('system.kernel.entropy_available', int(data)) |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
#cloud-config | |
write-files: | |
- path: /etc/conf.d/nfs | |
permissions: '0644' | |
content: | | |
OPTS_RPC_MOUNTD="" | |
users: | |
- name: XYZ | |
groups: |
When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
#!/bin/sh | |
# Simplified from this script, (less robust and more to the point): | |
# http://gmodarelli.com/2015/02/code-reviews-rubocop-git-pre-commit/ | |
# Installation: copy this code into <REPO>.git/hooks/pre-commit.sh | |
# Select only staged Ruby files | |
FILES="$(git diff --cached --name-only --diff-filter=AMC | grep "\.rb$" | tr '\n' ' ')" |
#Signing AWS Requests By Using Signature Version 4 | |
#http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html | |
require 'uri' | |
require 'openssl' | |
require 'net/http' | |
require 'cgi' | |
method = 'GET' | |
service = 'iam' |
# iops | |
resource "aws_db_instance" "rds" { | |
identifier = "${var.identifier}" | |
allocated_storage = "${var.allocated_storage}" | |
iops = "${var.iops}" | |
engine = "${var.engine}" | |
engine_version = "${var.engine_version}" | |
instance_class = "${var.instance_class}" | |
name = "${var.db_name}" | |
username = "${var.db_username}" |