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
# krun busybox whoami | |
krun(){ | |
local NAMESPACE=default | |
local PRIVILEGED=false | |
while getopts 'n:pu:' OPT; do | |
case $OPT in | |
n) NAMESPACE=$OPTARG | |
;; | |
p) PRIVILEGED=true |
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
using namespace System.Collections.Generic | |
# Encapsulate an arbitrary command | |
class PaneCommand { | |
[string]$Command | |
PaneCommand() { | |
$this.Command = ""; | |
} |
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/env -S awk -f | |
# https://gist.github.com/yermulnik/7e0cf991962680d406692e1db1b551e6 | |
# Tested with GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1) | |
# Usage: /path/to/tf_vars_sort.awk < variables.tf | tee sorted_variables.tf | |
# Note: "chmod +x /path/to/tf_vars_sort.awk" before use | |
# No licensing; [email protected], 2021-2024 | |
{ | |
# skip blank lines at the beginning of file | |
if (!resource_type && length($0) == 0) next |
Скрипт не претендует на истину первой инстанции
Да, я знаю что есть способ ${the_best_pg_backup_method}
Это просто скрипт которым я поделился - хочешь пользуйся, не хочешь - иди мимо
I had a need to protect my Kubernetes config file on my computer against accidental or malicious change or reading, so I came up with this way of protecting the config files.
The ~/.kube folder is mounted using encfs. By using the --ondemand
flag it
will automatically ask for the encryption key/password when accessed and keep
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/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...] |
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
$URI = [uri]'https://software-download.microsoft.com/download/sg/444969d5-f34g-4e03-ac9d-1f9786c69161/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-gb.iso' | |
$URI = [uri]'https://software-download.microsoft.com/db/Win10_21H2_English_x64.iso?t=f9f3df6c-feba-4bf8-ac99-0636e0aef143&e=1639004633&h=c846122b22c606dd744b83f9429955ab' |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: orange; icon-glyph: quote-right; | |
// Change these to your usernames! | |
const user = "spencer" | |
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E" | |
const telegram = "realSpencerWoo" | |
const github = "spencerwooo" |
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/bash | |
# pre-requisites: | |
# apt install python3-pip awscli | |
# pip3 install certbot certbot-dns-route53 awscli | |
# mkdir .certbot/{config,work,logs} | |
# IAM policy attached to EC2 instance with: | |
# - route53:ListHostedZones | |
# - route53:GetChange | |
# - route53:ChangeResourceRecordSets |
NewerOlder