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
/* | |
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively | |
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c | |
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c | |
usage: LD_PRELOAD=/path/to/library.so program args ... | |
This file is in the public domain. | |
*/ |
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 | |
# !!! WARNING !!! | |
# Before you execute this script you should backup your repository. | |
# https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_the_nuclear_option_filter_branch | |
git filter-branch --prune-empty --tree-filter 'rm -rf graph/node_modules' -- --all | |
# https://stackoverflow.com/questions/7654822/remove-refs-original-heads-master-from-git-repo-after-filter-branch-tree-filte | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
#!/usr/bin/python3 | |
# | |
# usage: python3 docker_descendants.py <image_id> ... | |
import sys | |
from subprocess import check_output | |
def main(images): | |
image_ids = set(images) |
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
irma-sun /home/mim/projects/third-party/pipenv # git --no-pager log --oneline -1 | |
7a696ceb (HEAD -> old-master) hope i don't regret this :) | |
irma-sun /home/mim/projects/third-party/pipenv # docker rm pipenv_pipenv-tests_1; docker-compose up | |
pipenv_pipenv-tests_1 | |
Creating pipenv_pipenv-tests_1 ... done | |
Attaching to pipenv_pipenv-tests_1 | |
pipenv-tests_1 | Collecting certifi | |
pipenv-tests_1 | Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB) | |
pipenv-tests_1 | Installing collected packages: certifi | |
pipenv-tests_1 | Successfully installed certifi-2018.8.24 |
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 | |
ATTEMPTS=20 | |
step () { | |
tput setaf 5; tput bold | |
echo | |
echo "$@" | |
tput sgr 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
from csv import writer | |
from os import listdir | |
from os.path import isfile | |
from sys import argv | |
import logging | |
import re | |
logger = logging.getLogger('iservice') | |
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
from enum import Enum | |
class LabeledEnum(Enum): | |
@staticmethod | |
def __new_member__(cls, value, label): | |
enum_member = object.__new__(cls) | |
enum_member._value_ = value | |
enum_member.label = label | |
return enum_member |
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
# ethtool -s enp7s0 speed 100 duplex full | |
# ethtool enp7s0 | |
Settings for enp7s0: | |
Supported ports: [ TP MII ] | |
Supported link modes: 10baseT/Half 10baseT/Full | |
100baseT/Half 100baseT/Full | |
1000baseT/Half 1000baseT/Full | |
Supported pause frame use: No | |
Supports auto-negotiation: Yes | |
Supported FEC modes: Not reported |