mathieu / Yank complete file
0 likes
0 forks
1 files
Last active
1 | -- copy |
2 | vim.keymap.set('n', 'yc', '<cmd>%y<CR>', { desc = 'Yank [c]omplete file' }) |
mathieu / Kinetic energy
0 likes
0 forks
1 files
Last active
get kinetic energy for any object you know the speed and weight
1 | #!/usr/bin/env python3 |
2 | |
3 | import argparse |
4 | |
5 | # get kinetic energy for any object you know the speed and weight |
6 | # To use, just run python3 kinetic_energy.py --speed 30 --weight 1500 |
7 | # speed is in Km/h, weight in Kg |
8 | |
9 | |
10 | def calculate_energy(weight, velocity): |
mathieu / Backup with btrfs snapshots
0 likes
0 forks
1 files
Last active
1 | #!/usr/bin/env bash |
2 | |
3 | # Config |
4 | SOURCE="/home" |
5 | LOCAL_DEST="/snapshots" |
6 | DEST="/run/media/mathieu/ext_ssd/backups" |
7 | KEEP_LOCAL=10 # Nombre de snapshots locaux à conserver |
8 | KEEP_DISTANT=31 # Nombre de snapshots distant à conserver |
9 | DATE=$(date +"%Y-%m-%d_%H-%M-%S") |
10 | SNAPSHOT_NAME="$DATE" |
Newer
Older