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
| lawssh () | |
| { | |
| while [[ "$1" =~ ^- ]]; do | |
| laws_opts="${laws_opts} $1"; | |
| shift; | |
| done; | |
| pattern="$1"; | |
| shift; | |
| for i in $(laws ${laws_opts} "${pattern}"); | |
| do |
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
| diff --git a/crypto/Kconfig b/crypto/Kconfig | |
| index 84d71482bf08..42f6da112054 100644 | |
| --- a/crypto/Kconfig | |
| +++ b/crypto/Kconfig | |
| @@ -1608,6 +1608,23 @@ config CRYPTO_LZ4HC | |
| help | |
| This is the LZ4 high compression mode algorithm. | |
| + | |
| +config CRYPTO_LZ4 |
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
| _aws_internal_dns () | |
| { | |
| ip ro show | grep --color=auto default > /dev/null || return 0; | |
| local TMPFILE="/tmp/_aws_internal_dns"; | |
| local LOCK="${TMPFILE}.lock"; | |
| if [ -e "${LOCK}" ]; then | |
| local now="$(date +%s)"; | |
| local lock_time="$(stat -c "%Y" "${LOCK}")"; | |
| if [ $((${now}-${lock_time})) -gt 30 ]; then | |
| rm -f "${LOCK}"; |
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/env bash | |
| # Minimum seconds the lock existed for. Default 300 seconds | |
| MINSECONDS="${1:-300}" | |
| # If stdin is not a pipe, exec 'mysql', else 'cat' to read stdin from the pipe | |
| { [ -t 0 ] && mysql -e "SHOW ENGINE INNODB STATUS\G" || cat; } | \ | |
| awk -v MINSECONDS=$MINSECONDS '$0 ~ /^(RECORD LOCKS space id|MySQL thread id |---TRANSACTION)/ { | |
| if ($1 == "---TRANSACTION" && $4 != "started") { | |
| if ($4>=MINSECONDS) { |
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/env python3 | |
| import argparse | |
| import boto3 | |
| import os | |
| import time | |
| import json | |
| import re | |
| instance_filters = { |
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
| 2017/01/31 17:35:31 [INFO] Terraform version: 0.8.5 b4d477660b5abd20f2a70175460c9603797fada0 | |
| 2017/01/31 17:35:31 [INFO] CLI args: []string{"/opt/hashicorp/bin/terraform", "apply"} | |
| 2017/01/31 17:35:31 [DEBUG] Detected home directory from env var: /home/jordi | |
| 2017/01/31 17:35:31 [DEBUG] Detected home directory from env var: /home/jordi | |
| 2017/01/31 17:35:31 [DEBUG] Attempting to open CLI config file: /home/jordi/.terraformrc | |
| 2017/01/31 17:35:31 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
| 2017/01/31 17:35:31 [DEBUG] Detected home directory from env var: /home/jordi | |
| 2017/01/31 17:35:31 [DEBUG] vertex "module.asg_module": static expanding | |
| 2017/01/31 17:35:31 [DEBUG] DestroyEdgeInclude: Checking: module.asg_module.aws_autoscaling_group.asg | |
| 2017/01/31 17:35:31 [DEBUG] DestroyEdgeInclude: Checking: module.asg_module.aws_autoscaling_group.asg |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| $script = <<END | |
| RUBY_VERSION="2.2.5" | |
| sudo apt-get -y update | |
| sudo apt-get -y install git nodejs | |
| # Install ruby environment | |
| if ! type rvm >/dev/null 2>&1; then | |
| curl -sSL https://rvm.io/mpapis.asc | gpg --import - |
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 | |
| TERRAFORM_DIR="TERRAFORM_DIRECTORY" | |
| find ${TERRAFORM_DIR} -name "*.tfstate" | while read lfile; do | |
| rfile="$(jq '.remote.config | select (.key != null) | "s3://" + .bucket + "/" + .key' ${lfile} -r)" | |
| if [ -n "${rfile}" ]; then | |
| if ! diff -q ${lfile} <(s3cmd --no-progress get ${rfile} -) > /dev/null; then | |
| echo "${lfile} differs, syncing ..." | |
| cd "$(dirname "${lfile}")/.." | |
| terraform remote pull && \ |
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 | |
| declare -A COLORS | |
| COLORS[RED]='\033[0;31m' | |
| COLORS[GREEN]='\033[0;32m' | |
| COLORS[NC]='\033[0m' | |
| COLORS[WHITE]='\033[1m' | |
| # Print a string using colors | |
| # $1 The color |