- Ctrl+H to launch Find and Replace dialog.
- Check "Use wildcards".
- Type
<([0-9]@)-([0-9]@)>
in the "Find what:" box. This pattern represents a search for whole words that have one number, a hyphen, and another number. - Type
\1^=\2
in the "Replace with:" box. This maintains the numbers found in the find, while substituting the hyphen with an en dash. - Click the "Find Next" button to step through each instance and replace. I do not recommend using Replace All.
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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root." | |
exit 2 | |
fi | |
PKI_DIR=/var/lib/k0s/pki/etcd | |
export ETCDCTL_CACERT=$PKI_DIR/ca.crt | |
export ETCDCTL_CERT=$PKI_DIR/peer.crt |
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
#!/bin/bash | |
export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml | |
/var/lib/rancher/rke2/bin/crictl "$@" |
For https://copr.fedorainfracloud.org/coprs/frederickding/haproxy/
Bumped to f41 branch (haproxy 3.0.x).
Bumped to f40 branch (haproxy 2.9.x).
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 | |
DOMAIN=`basename "$RENEWED_LINEAGE"` | |
case $DOMAIN in | |
host.example.com) | |
echo "Host certs renewed" | |
cp $RENEWED_LINEAGE/fullchain.pem /etc/cockpit/ws-certs.d/$DOMAIN.crt | |
cp $RENEWED_LINEAGE/privkey.pem /etc/cockpit/ws-certs.d/$DOMAIN.key | |
chown cockpit-ws:cockpit-ws /etc/cockpit/ws-certs.d/$DOMAIN.crt /etc/cockpit/ws-certs.d/$DOMAIN.key | |
echo "Restarting Cockpit" |
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-Module Veeam.Backup.PowerShell | |
$outputBuilder = New-Object System.Text.StringBuilder | |
[void]$outputBuilder.AppendLine('ESC "@"') | |
[void]$outputBuilder.AppendLine('ESC "2"') | |
$job = Get-VBRTapeJob -Name ExampleJobName | |
$lastjob = (Get-VBRTapeBackupSession -Job $job | Sort-Object EndTime | Select-Object -Last 1) | |
# get the tape name | |
$tape = (Get-VBRTapeMedium -MediaPool $job.Target | Sort-Object LastWriteTime | Select-Object -Last 1) |
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 | |
from escpos import * | |
import argparse | |
import os | |
import sys | |
import datetime | |
cli_parser = argparse.ArgumentParser(description='Print to a network ESCPOS receipt printer.') | |
cli_parser.add_argument('file', help='text file to print') | |
cli_parser.add_argument('--printer', '-p', default="192.168.1.253", help='IP address or hostname of printer') |
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
#!/bin/sh | |
find /mnt/isos -type f -not \( -path '#recycle' -o -name '.DS_Store' -o -path '*@eaDir*' \) 2>/dev/null | sort |
NewerOlder