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
# Connect to PostgreSQL database internally | |
kubectl run -i --tty --rm psql --image=postgres --env "PGPASSWORD=user_password" --command -- \ | |
psql -U myuser -h patroni.patroni.svc.cluster.local my_database | |
# Port forwarding to service | |
kubectl port-forward -n harbor service/harbor 8080:443 |
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 -eu | |
# This script is trying to produce the same stats as CrystalDiskMark for Windows | |
# using fio. | |
# If you specify the raw disk (like /dev/sdc) the all it's content will be removed! | |
# The script should not run longer than 20 minutes | |
TMP_FILE=${TMP_FILE:-/tmp/$(basename $0).tmp} | |
UNATTENDED=${UNATTENDED:-0} |
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
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-init.log%' /etc/init.d/ddns | |
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-hotplug.log%' /etc/hotplug.d/iface/95-ddns | |
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-updater.log%' /usr/lib/ddns/dynamic_dns_updater.sh | |
# $ head -5 /etc/init.d/ddns | |
# #!/bin/sh /etc/rc.common | |
# set -x -v | |
# exec &>/tmp/ddns-init.log | |
# START=95 | |
# STOP=10 |
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
VBoxManage list vms | |
VBoxManage controlvm 6d3e674d-7626-4142-969f-8017b679fbd0 poweroff | |
VBoxManage unregistervm --delete 6d3e674d-7626-4142-969f-8017b679fbd0 |
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 | |
apt-get install -y --no-install-recommends ca-certificates curl jq | |
VAGRANT_LATEST_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/vagrant | jq -r -M '.current_version') | |
curl https://releases.hashicorp.com/vagrant/${VAGRANT_LATEST_VERSION}/vagrant_${VAGRANT_LATEST_VERSION}_x86_64.deb --output /tmp/vagrant_x86_64.deb | |
apt install -y /tmp/vagrant_x86_64.deb | |
rm /tmp/vagrant_x86_64.deb |
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 | |
apt-get install -y --no-install-recommends curl jq unzip | |
PACKER_LATEST_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r -M '.current_version') | |
curl https://releases.hashicorp.com/packer/${PACKER_LATEST_VERSION}/packer_${PACKER_LATEST_VERSION}_linux_amd64.zip --output /tmp/packer_linux_amd64.zip | |
unzip /tmp/packer_linux_amd64.zip -d /usr/local/bin/ | |
rm -f /tmp/packer_linux_amd64.zip |
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 -eu | |
for XMP_FILE in *.xmp; do | |
RAW_FILE=`awk -F \" '/xmpMM:DerivedFrom=/ { print $2 }' $XMP_FILE` | |
RAW_FILE_NAME="${XMP_FILE%.*}" | |
FILE_NAME="${RAW_FILE%.*}" | |
echo "*** $XMP_FILE [$RAW_FILE] [$FILE_NAME]" | |
if [ "$RAW_FILE_NAME" != "$RAW_FILE" ]; then |
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
image: ubuntu | |
build_script: | |
# Download ans install minikube | |
# Download kubectl, which is a requirement for using minikube | |
- curl -sL https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o kubectl | |
- chmod +x kubectl | |
- sudo mv kubectl /usr/local/bin/ | |
# Download minikube | |
- curl -sL https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 -o minikube |
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
### Master node installation | |
# SSH to the first VM which will be your Master node: | |
ssh root@node1 | |
# Set the Kubernetes version which will be installed: | |
KUBERNETES_VERSION="1.10.0" | |
# Set the proper CNI URL: | |
CNI_URL="https://raw.githubusercontent.com/coreos/flannel/v0.10.0/Documentation/kube-flannel.yml" |
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 -eux | |
DESTINATION_VIDEO_FILE="$HOME/Videos/`date +%F_%T`.mkv" | |
DESTINATION_SCREENSHOT_DIRECTORY="$HOME/Pictures/" | |
MAX_RECORDING_TIME="18000" #seconds (5 hours) | |
echo "*** $DESTINATION_VIDEO_FILE" | |
ffmpeg -loglevel error -f x11grab -draw_mouse 1 -framerate 25 -video_size 1920x1080 -i :0+0,0 -pix_fmt yuv420p -c:v libx265 -x265-params crf=28 -preset veryfast -to ${MAX_RECORDING_TIME} $DESTINATION_VIDEO_FILE & |