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 | |
| # Copyright 2019 Mikko Rantalainen | |
| # License: MIT X License | |
| # | |
| # Debian/Ubuntu requirements: | |
| # sudo apt install fio jq | |
| # | |
| # See also: https://fio.readthedocs.io/en/latest/fio_doc.html | |
| # | |
| set -e |
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
| #.... | |
| # BEGIN | |
| INODES=$( cat /proc/22853/task/22853/fdinfo/25 | grep -E -oh ' ino:[0-9a-zA-Z]*' | grep -oh ':[0-9A-Za-z]*' | sed 's/://g' | xargs -I {} printf "%d\n" 0x{} ) | |
| for DEVICE in $(df -h | grep sd | grep -oh '/dev/sd[a-z0-9]* '); do | |
| echo "$INODES" | xargs -I {} debugfs -R "ncheck {}" /dev/sdc 2>/dev/null | grep -v Pathname | |
| done; | |
| # END |
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/sh | |
| # Get the procs sorted by the number of inotify watchers | |
| # | |
| # From `man find`: | |
| # %h Leading directories of file's name (all but the last element). If the file name contains no slashes (since it | |
| # is in the current directory) the %h specifier expands to `.'. | |
| # %f File's name with any leading directories removed (only the last element). | |
| lines=$( | |
| find /proc/*/fd \ |
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
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "title": "Kubernetes", | |
| "version": "v1.10.3" | |
| }, | |
| "paths": { | |
| "/api/": { | |
| "get": { | |
| "description": "get available API versions", |
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
| { | |
| "type": "array", | |
| "minItems": 100, | |
| "maxItems": 200, | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "example": { | |
| "$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json" | |
| } |
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 | |
| apt-get install -y curl unzip | |
| mkdir -p /var/lib/consul | |
| mkdir -p /usr/share/consul | |
| mkdir -p /etc/consul/conf.d | |
| curl -OL https://dl.bintray.com/mitchellh/consul/0.3.1_linux_amd64.zip | |
| unzip 0.3.1_linux_amd64.zip | |
| mv consul /usr/local/bin/consul |
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
| s:%:%25:g | |
| s: :%20:g | |
| s:<:%3C:g | |
| s:>:%3E:g | |
| s:#:%23:g | |
| s:{:%7B:g | |
| s:}:%7D:g | |
| s:|:%7C:g | |
| s:\\:%5C:g | |
| s:\^:%5E:g |
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
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |
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
| node { | |
| // https://registry.hub.docker.com/_/maven/ | |
| def maven32 = docker.image('maven:3.2-jdk-7-onbuild'); | |
| stage 'Mirror' | |
| // First make sure the slave has this image. | |
| // (If you could set your registry below to mirror Docker Hub, | |
| // this would be unnecessary as maven32.inside would pull the image.) | |
| maven32.pull() | |
| // We are pushing to a private secure docker registry in this demo. |