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
""" | |
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 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: 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 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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echoserver | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
run: echoserver |
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
alias oscp='scp -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no"' | |
alias ossh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no"' |
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 | |
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 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
# 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 |
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 sys, os | |
i = 0 | |
print sys.argv[1] | |
f = open(sys.argv[1]) | |
for line in f.readlines(): | |
if line.startswith('---'): | |
i = i+1 | |
filename = "%02d-%s" % (i,sys.argv[1]) | |
w = open(filename,'a') | |
w.write(line) |
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
set number | |
set noai | |
set noautoindent | |
set fo= | |
set background=dark | |
syntax on | |
"set tabstop=4 shiftwidth=4 expandtab | |
set nocompatible | |
set backspace=2 | |
autocmd BufWritePre * %s/\s\+$//e |
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 python | |
""" | |
Server | |
""" | |
import SocketServer | |
import BaseHTTPServer | |
import requests | |
import os |
NewerOlder