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
# OGS_ID es tu número de usuario (https://online-go.com/player/XXXXXXX) | |
# la secuencia genera números del 1 al 4 por defecto y cada página son 10 partidas | |
for i in $(seq 1 4); do | |
curl -sLk 'https://online-go.com/api/v1/players/'${OGS_ID}'/games/?ordering=-ended&page='$i \ | |
| jq -r '.results[].related.detail' | |
done | while read game; do | |
echo $game | |
curl -sLk https://online-go.com/${game}/sgf -o $(basename $game).sgf | |
done |
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 | |
if [[ $# != 3 ]]; then | |
echo "Cowardly refusing to run without exactly three arguments" | |
echo "Syntax: $0 key-string container-url file" | |
exit 1 | |
fi | |
API_VERSION="2015-02-21" | |
DATE=$(TZ=GMT date +"%a, %d %b %Y %T %Z") |
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 | |
if [[ $# != 2 ]]; then | |
echo "Cowardly refusing to run without exactly two arguments" | |
echo "Syntax: $0 key-string url" | |
exit 1 | |
fi | |
API_VERSION="2019-08-01.10.0" | |
DATE=$(date +"%a, %d %b %Y %T %Z") |
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
# Create NUM_CLUSTER minikube clusters | |
if [[ -z $NUM_CLUSTER ]]; then | |
NUM_CLUSTER=2 | |
fi | |
if [[ -z $VERSION ]]; then | |
VERSION=0.1.0-rc5 | |
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
node 'puppet-database.intelliment-labs.com' { | |
include role::app1::database | |
} | |
node 'puppet-webserver.intelliment-labs.com' { | |
include role::app1::webserver | |
} | |
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
node 'itlm.example.com' { | |
# ... | |
itlm::requirement { 'network-to-backup': | |
source_ip => [ '10.0.42.0/24', '10.0.23.0/24' ], # network devices networks | |
dest_ip => '10.0.16.0/24', # backup network | |
ports => [ '6123/tcp', '6123/udp' ], | |
} |
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
tabs -40; sudo iwlist wlp3s0 scan | egrep "ESSID|Qual" | tac | sed -n 's/^\s*//g;N;s/\n/\t/;p' | sort -r -t= -k2; tabs -4 |
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
pdf2txt.py CIS_Microsoft_Windows_Server_2012_R2_Benchmark_v1.1.0.pdf | tr -d '\f' | sed -nr '/^[0-9]+\.[0-9]+/,/^$/p;/^Computer Configuration/,/^$/p;/^User Configuration/,/^$/p' | egrep -v '\.\.\.|CCE|^1\.0\.0|^1\.1.\0|P a g e' | cat -s | awk 'BEGIN { RS = ""; OFS = " "} {$1 = $1; print ; print '\n'}' > CIS_Microsoft_Windows_Server_2012_R2_Group_policies.txt |
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 expect | |
# Cada test debe ser de la forma: | |
# protocol XX from XX to XX source XX destination XX destination-port XX application XX | |
# protocol es obligatorio y puede ser 1 si es ICMP, 6 si es TCP, 17 si es UDP (ver /etc/protocols) | |
# destination-port es obligatorio | |
# application es opcional aunque conveniente si se sabe | |
# es conveniente indicar las zonas con from XX y to XX (es conveniente para evitar que se vaya por otra regla) | |
# El nombre del fichero se proporciona en el primer parámetro |
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
class String | |
def gsubh!(regexph) | |
regexph.each {|r, s| self.gsub!(r, s) } | |
self | |
end | |
end |
NewerOlder