This file contains hidden or 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
<domain type='kvm'> | |
<name>truenas</name> | |
<memory unit='KiB'>8388608</memory> | |
<currentMemory unit='GiB'>8</currentMemory> | |
<vcpu placement='static'>2</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-q35-9.2'>hvm</type> | |
<boot dev='cdrom'/> | |
<boot dev='hd'/> | |
</os> |
This file contains hidden or 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/env sh | |
BLUE='\033[0;34m' | |
NC='\033[0m' # No Color | |
log() { | |
# Log levels: error (red), info (green), warn (yellow), critical (bold red) | |
case $1 in | |
error) level='\033[0;31mERROR' ;; | |
info) level='\033[0;32mINFO' ;; |
This file contains hidden or 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/env bash | |
# | |
# This script runs rclone bisync between two paths and sends a notification to | |
# the user if something goes wrong with notify-send. | |
# It is intended to run frequently with a cronjob or systemd user timer. | |
# | |
# rclone-bisync path1 path2 [--resync] [--verbose] [--dry-run] | |
# | |
verbose=false |
This file contains hidden or 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
--- | |
# as the subscription manager task is rather slow | |
- name: Test to see if system is already subscribed | |
ansible.builtin.command: subscription-manager status | |
register: rhsm_status | |
changed_when: false | |
failed_when: rhsm_status.rc > 1 | |
async: 60 # wait for up to one minute for the task to complete | |
poll: 4 |
This file contains hidden or 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
# ... | |
# At/near the bottom, add: | |
# Login notifications | |
session required pam_exec.so /usr/local/sbin/sshlogin-alert.sh | |
# Standard Un*x password updating. | |
@include common-password |
This file contains hidden or 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
import re | |
from thefuck.utils import get_all_matched_commands, replace_command, for_app | |
supported_cmds = 'kubectl', 'oc' | |
@for_app(*supported_cmds, at_least=1) | |
def match(command): | |
return ("error: unknown command" in command.output and | |
"Did you mean this?" in command.output) |
This file contains hidden or 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/env python3 | |
# Convert HEIC images in the current working directory to JPEG | |
# Uses Python's Wand library, and Pathlib | |
# https://docs.wand-py.org/en/0.6.7/index.html | |
from pathlib import Path | |
from wand.image import Image | |
heic = Path('./').glob('*.heic') | |
for f in heic.__iter__(): | |
with Image(filename=f) as original: |
This file contains hidden or 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://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/windowsterminal/Solarized%20Dark%20Higher%20Contrast.json | |
"name": "Solarized Dark Higher Contrast", | |
"black": "#002831", | |
"red": "#d11c24", | |
"green": "#6cbe6c", | |
"yellow": "#a57706", | |
"blue": "#2176c7", | |
"purple": "#c61c6f", | |
"cyan": "#259286", |
This file contains hidden or 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
apiVersion: config.openshift.io/v1 | |
kind: OAuth | |
metadata: | |
name: cluster | |
spec: | |
identityProviders: | |
- mappingMethod: claim | |
name: $name | |
openID: | |
claims: |
This file contains hidden or 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
bash -x tomcat/bin/catalina.sh run | |
+ cygwin=false | |
+ darwin=false | |
+ os400=false | |
+ hpux=false | |
+ case "`uname`" in | |
++ uname | |
+ PRG=tomcat/bin/catalina.sh | |
+ '[' -h tomcat/bin/catalina.sh ']' | |
++ dirname tomcat/bin/catalina.sh |
NewerOlder