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
curl --silent https://www.federginnastica.it/documenti/circolari.html | grep "pd-button-download" | awk '{print $6}' | sed "s/:/ /g" | awk '{print $2}' | tr -d '"' |
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 | |
NAMESSPACE=`kubectl get namespaces --field-selector status.phase=Terminating --output json | jq '.items[].metadata.labels."kubernetes.io/metadata.name"' | tr -d '"'` | |
if [ -z ${NAMESPACE} ]; then | |
echo "ERROR: there is no stuck namespace in Terminating status" | |
exit 1 | |
else | |
echo "INFO: found ${NAMESPACE} namespace stuck in Terminating status" |
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 | |
NEXUS_BIN=/opt/sonatype/nexus | |
NEXUS_DATA=/opt/sonatype/sonatype-work/nexus3 | |
h2sql() { | |
echo "> $@" >&2 | |
java -cp "$NEXUS_BIN"/system/com/h2database/h2/*/h2-*.jar org.h2.tools.Shell -url jdbc:h2:"$NEXUS_DATA"/db/nexus -sql "$@" | |
} | |
schema=$(h2sql "SCRIPT NODATA") |
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 | |
IMAGE="gcr.io/google-containers/ubuntu-slim:0.14" | |
COMMAND="/bin/bash" | |
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]') | |
usage_exit() { | |
echo "Usage: $0 [-c command] [-i image] PVC ..." 1>&2 | |
exit 1 | |
} |
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
function deleteWorkouts() { | |
const deleteWorkoutElements = document.querySelectorAll('.delete-workout'); | |
if (deleteWorkoutElements.length === 0) { | |
console.log('No more "delete-workout" elements found.'); | |
return; | |
} | |
deleteWorkoutElements[0].click(); |
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 | |
for dir in `find . -type d -not -path '*/.*'`; | |
do | |
echo -en "${dir}: "; | |
find ${dir} -type f -not -path '*/.*' -exec md5sum {} \; | md5sum | awk '{print $1}'; | |
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
# FusionAuth database has tables which don't have primary keys this is a problem from the Digital Ocean perspective, | |
# because they are using row-based replication with the MySQL engine to provide backups and read replicas. | |
# We have migrated 2 environments, from MySQL 8 to PostgreSQL 12 | |
# pgloader help | |
docker run --rm --name pgloader dimitri/pgloader:latest pgloader --help | |
# run pgloader | |
docker run --rm --name pgloader dimitri/pgloader:latest pgloader --no-ssl-cert-verification --verbose --debug \ | |
"mysql://odyssey-auth:${mysql_password}@${digitalocean_mysql_host}:25060/odyssey-auth" |
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 for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D |
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
-- | |
-- Change database owner | |
-- | |
ALTER DATABASE "db_name" OWNER TO user; | |
-- | |
-- List schemas | |
-- |
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 | |
url="https://releases.hashicorp.com/vault" | |
latest_version=`curl -s ${url}/ | grep -A6 "<a href=\"../\">../</a>" | grep vault | cut -d '_' -f 2 | cut -d '<' -f 1` | |
bin="/usr/local/bin/vault" | |
install () { | |
cd /tmp && \ | |
/bin/wget -q ${url}/${latest_version}/vault_${latest_version}_linux_amd64.zip && \ | |
/bin/unzip -qq vault_${latest_version}_linux_amd64.zip |
NewerOlder