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
$ # Use Live CD to boot | |
$ sudo su # Switch to root | |
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid | |
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/ | |
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition | |
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition | |
$ mount /dev/mapper/fedora_fedora-var /mnt/var | |
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition |
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 | |
## Author: Jeff Higham <jeff@f3code.com>, <jeffhigham@gmail.com> | |
## Gist: https://gist.github.com/jeffhigham-f3/3b94d508269e614f1f2e701ada8239cc | |
## | |
## Usage: mysqlbackup | |
## | |
## BEGIN EDITING | |
# timestamp for backups |
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/sh | |
WEBHOOK_URL="put your url here" | |
PING="<@put your user id here>" | |
MESSAGE="$PING reminder" | |
JSON="{\"content\": \"$MESSAGE\"}" | |
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL" |
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/python | |
# | |
# Based on answer from | |
# http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux | |
# | |
from time import sleep | |
import os | |
import os.path | |
import sys |