Skip to content

Instantly share code, notes, and snippets.

View nathmo's full-sized avatar

Nathann Morand nathmo

  • Aperture Science
  • Switzerland
View GitHub Profile
@nathmo
nathmo / dockerBackup.sh
Last active February 28, 2024 16:16
script to backup docker Volume to a remote server using rsnapshot (rsync rotating backup)
root@isoserver:/home/nemo# cat /bin/dockerBackup
#!/bin/bash
# add any of the following to crontab pretty string for the folder name and the number of version to rotate (for each frequency you require):
# 00 03 * * * /bin/dockerBackup daily 4 # every day at 1 am, keep for 4 days
# 00 02 * * 0 /bin/dockerBackup weekly 14 # every sunday at 2 am, keep for 2 weeks
# 00 01 1 * * /bin/dockerBackup monthly 90 # every first day of the month at 3 am, keep for 3 month
# and this is the actual script :
@nathmo
nathmo / TDARR Flow
Last active January 8, 2024 17:37
TDARR Flow, force h264 good quality, 1080p max, 30 fps, .mp4, bitrate 3000 kbps max
{
"name": "Flow 0",
"description": "Flow 0",
"tags": "",
"flowPlugins": [
{
"name": "Input File",
"sourceRepo": "Community",
"pluginName": "inputFile",
"version": "1.0.0",
@nathmo
nathmo / casino.py
Last active December 19, 2023 11:54
Gamma Distribution Find Best Cashout
import numpy as np
from scipy.stats import gamma, kstest
import matplotlib.pyplot as plt
def fit_gamma_distribution(data):
"""
Fit a gamma distribution to the given data and return the parameters.
Parameters:
- data: List or array of numerical values.
@nathmo
nathmo / RPIbridgeL2.md
Last active October 21, 2023 17:24
Raspberry pi L2 bridge wifi ethernet

install log2ram and dhcpcd5

echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ bookworm main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg  https://azlux.fr/repo.gpg
@nathmo
nathmo / reversessh.md
Last active September 1, 2023 12:24
reverse SSH as a systemd service
sudo apt install autossh
sudo nano /etc/systemd/system/autossh.service
[Unit]