Skip to content

Instantly share code, notes, and snippets.

@karavan
karavan / awgcfg.py
Last active November 6, 2024 05:44 — forked from remittor/awgcfg.py
# SPDX-License-Identifier: MIT
# Author: remittor <[email protected]>
# Created: 2024
import os
import sys
import glob
import subprocess
import optparse
import random
@karavan
karavan / pasScp.sh
Created July 13, 2022 18:58 — forked from MContagious/pasScp.sh
sftp command line
#/bin/env bash
#
# pasScp.sh is a sftp command line bash script to transfer localfiles to remote host using sshpass command.
#
function usage {
echo "usage: "
echo "sftp --user <username> --host <remotehost> -i <identifier-passwordfile> -f|--file <localfile> --path <remote_location> --help --verbose"
echo " --user|-u user name to use to login to sftp"
@karavan
karavan / script-template.sh
Created November 18, 2021 16:51 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
#### Contents of the preconfiguration file (for stretch)
### Localization
# Preseeding only locale sets language, country and locale.
#d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
d-i debian-installer/language string en
d-i debian-installer/country string DK
d-i debian-installer/locale string en_DK.UTF-8
# Optionally specify additional locales to be generated.