Skip to content

Instantly share code, notes, and snippets.

View mrjk's full-sized avatar

mrjk

  • Montréal
View GitHub Profile
@mrjk
mrjk / .bashrc
Last active September 7, 2022 04:31
minimal bashrc
# Base stuffs
alias la='ls -ah'
alias ll='ls -lh'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ~='cd ~'
@mrjk
mrjk / system-info-report.sh
Last active December 21, 2023 20:27
Linux server report
#!/bin/bash
main ()
{
local dest=${1:-REPORT}
mkdir -p $dest
@mrjk
mrjk / openssl-speed-test.sh
Last active December 21, 2023 20:43
CPU Crypt speed Bench
#!/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
@mrjk
mrjk / disk-speed-test.sh
Last active December 21, 2023 20:28
Get disk infos and test speed with dd
#!/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
@mrjk
mrjk / oneliners.bash
Last active January 9, 2024 03:38
Bash oneliners
# 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
# =========
@mrjk
mrjk / bash_lib_app.sh
Last active December 31, 2023 02:26
Bash utils lib
# Logging and User interactions
# ==============
_log ()
{
local lvl=${1:-DEBUG}
shift 1 || true
local msg=${*}
if [[ "$msg" == '-' ]]; then
@mrjk
mrjk / run_iodine_client.sh
Created September 16, 2021 12:01
Iodine Scripts
#!/bin/bash
# Author: https://gist.github.com/mrjk/
# License: MIT
IODINE_PASS=mypass
IODINE_DOMAIN=t.mydomain.org
IODINE_GW=10.18.0.1
IODINE_FORWARD=true
IODINE_SERVER=w.x.y.z
@mrjk
mrjk / disks_infos.sh
Created July 11, 2021 19:15
A little script to get disks informations
#!/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
@mrjk
mrjk / libvirt-hook-wrapper.sh
Created May 13, 2021 21:36
A generic shell hook handler for libvirt
#!/bin/bash
#
# Libvirt Hook Wrapper
# =========================
# Little tool to manage libivrt hooks in an easy way.
#
# Documentation:
# ---------------
# - https://libvirt.org/hooks.html
#
@mrjk
mrjk / slack_notify.py
Last active February 6, 2025 17:22
Portable python script to send Slack notifications (Archive)
#!/usr/bin/python3
#
# Migrated to: https://github.com/mrjk/python_components/blob/main/helpers/slack_notify.py
#
# Documentation
# =============================
#
# This little script to easily send slack notifications.
# Tiger's team webhooks are configured here: https://XXX.slack.com/apps/YYY-incoming-webhooks
#