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
alias oscp='scp -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no"' | |
alias ossh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no"' |
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 | |
git show :group_vars/all/vault | grep ^'$ANSIBLE_VAULT' | |
export encrypted=$? | |
if [ $encrypted -ne 0 ]; then | |
echo Ansible Vault not encrypted, refusing to commit | |
exit 1 | |
fi |
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
""" | |
MIT License | |
Copyright (c) 2023 Saverio Proto | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
--- | |
apiVersion: gateway.networking.k8s.io/v1beta1 | |
kind: Gateway | |
metadata: | |
name: bookinfo-gateway | |
namespace: istio-system | |
annotations: | |
service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /productpage | |
# TODO test: | |
# service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /healthz/ready |
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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echoserver | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
run: echoserver |
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 python | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
# To debug code on a single key you can use this instead of the for loops: | |
# key = r.randomkey() | |
# Delete all keys not accessed since 'idletime' | |
for key in r.scan_iter("*"): | |
idle = r.object("idletime", key) |
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
[user] | |
name = Saverio Proto | |
email = zioproto@gmail.com | |
[core] | |
editor = vim | |
autocrlf = input | |
[color] | |
diff = auto |
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 python3 | |
import requests | |
from requests.adapters import HTTPAdapter, Retry | |
import os | |
s = requests.Session() | |
retries = Retry(total=5, | |
backoff_factor=0.1, | |
status_forcelist=[ 500, 502, 503, 504 ]) |
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
# If using bash add to ~/.inputrc | |
"\e[1;5D": backward-word | |
"\e[1;5C": forward-word | |
# If using zsh add to ~/.zprofile | |
bindkey -e | |
bindkey '^[[1;5C' forward-word |
NewerOlder