Skip to content

Instantly share code, notes, and snippets.

View kvolkovich-sc's full-sized avatar
🖖

Kirill Volkovich kvolkovich-sc

🖖
View GitHub Profile
#!/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
#....
# 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
#!/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 \
{
"swagger": "2.0",
"info": {
"title": "Kubernetes",
"version": "v1.10.3"
},
"paths": {
"/api/": {
"get": {
"description": "get available API versions",
{
"type": "array",
"minItems": 100,
"maxItems": 200,
"items": {
"type": "object",
"properties": {
"example": {
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json"
}
@kvolkovich-sc
kvolkovich-sc / consul.sh
Created December 26, 2017 15:58 — forked from ianunruh/consul.sh
Install Consul on Ubuntu 14.04
#!/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
@kvolkovich-sc
kvolkovich-sc / urlencode-sed.txt
Created September 28, 2017 09:18 — forked from tjluoma/urlencode-sed.txt
This is a file meant to be used with 'sed' for url-encoding strings.
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
@kvolkovich-sc
kvolkovich-sc / easing.js
Created April 13, 2017 14:18 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* 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
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.