$ docker exec -ti $container cut -d: -f1 /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo
eth0
eth1
eth2
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
# Logging and User interactions | |
# ============== | |
_log () | |
{ | |
local lvl=${1:-DEBUG} | |
shift 1 || true | |
local msg=${*} | |
if [[ "$msg" == '-' ]]; then |
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
# Other | |
# ========= | |
# See .bashrc config: https://gist.github.com/mrjk/fdb73dc33cbc1c23e21010efc451cbdd | |
# See: .vimrc config: https://gist.github.com/mrjk/1d146a701b201e77279ea4e7c5d075a5 | |
# See: bash library utils: https://gist.github.com/mrjk/31a2fb90c445fe516b0ae41eea7297ea | |
# Shell/Bash | |
# ========= |
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 | |
# Tooling: Debian | |
# apt install smartmontools sysstat hdparm | |
# Sata infos | |
# SATA revision 1.0 => 1.5 Gbit/s, 150 MB/s | |
# SATA revision 2.0 => 3 Gbit/s, 300 MB/s | |
# SATA revision 3.0 => 6 Gbit/s, 600 MB/s | |
# SATA revision 3.2 => 16 Gbit/s, 1969 MB/s |
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 | |
openssl speed | |
# See: https://openwrt.org/docs/guide-user/perf_and_log/benchmark.openssl | |
# https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators | |
cryptsetup benchmark | |
# See: https://possiblelossofprecision.net/?p=2255 |
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 | |
main () | |
{ | |
local dest=${1:-REPORT} | |
mkdir -p $dest |
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
# Base stuffs | |
alias la='ls -ah' | |
alias ll='ls -lh' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias ~='cd ~' |
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
" Source: https://gist.github.com/mrjk/1d146a701b201e77279ea4e7c5d075a5 | |
" Last update: 2024/11/13 | |
" Place this in /etc/vim/vimrc.local for debian based distros | |
" Place this in /etc/vimrc.local for rhel based distros | |
" Debian specifities | |
if filereadable("/usr/share/vim/vim80/defaults.vim") | |
source /usr/share/vim/vim80/defaults.vim | |
endif | |
" now set the line that the defaults file is not reloaded afterwards! |
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
[tool.poetry] | |
name = "python-project-poetry-template" | |
version = "0.1.0" | |
description = "Python Project Poetry Template" | |
authors = ["mrjk"] | |
license = "GPLv3" | |
packages = [ | |
{ include = "myprj"} | |
] |
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 | |
# To install in in: /usr/local/bin/merge_dirs | |
# Then: chmod +x /usr/local/bin/merge_dirs | |
set -eu | |
# Source: https://unix.stackexchange.com/a/155633 | |
# Usage: like mv but: SRC DEST |