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
#!/bin/bash | |
# make sure to run this with /bin/bash, NOT /bin/sh | |
echo | |
echo This script will help you setup ssh public key authentication. | |
host=dummy |
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 hudson.model.* | |
import jenkins.model.Jenkins | |
for (job in Jenkins.instance.items) { | |
if( job.getFullName().contains('my folder') ){ | |
stopJobs(job) | |
} | |
} |
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 os | |
import glob | |
import shutil | |
from pathlib import Path | |
import math | |
dirs = [ | |
'/Volumes/Storage4', | |
'/Volumes/Storage3', |
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
# filter by request host header | |
varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
# filter by request url | |
varnishlog -q 'ReqURL ~ "^/some/path/"' | |
# filter by client ip (behind reverse proxy) | |
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
# filter by request host header and show request url and referrer header |
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
function fish_prompt --description 'Informative prompt' | |
#Save the return status of the previous command | |
set -l last_pipestatus $pipestatus | |
set -lx __fish_last_status $status # Export for __fish_print_pipestatus. | |
if functions -q fish_is_root_user; and fish_is_root_user | |
printf '%s@%s %s%s%s# ' $USER (prompt_hostname) (set -q fish_color_cwd_root | |
and set_color $fish_color_cwd_root | |
or set_color $fish_color_cwd) \ | |
(prompt_pwd) (set_color normal) |
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 bash | |
set -eo pipefail | |
READ_LINK=$([[ "$OSTYPE" == "darwin"* ]] && echo greadlink || echo readlink) | |
cd "$(dirname $(${READ_LINK} -f "${BASH_SOURCE[0]}"))/.." | |
IP=$(hcloud server list --selector "name=$1" --output noheader --output columns=IPV4) | |
echo Connecting to $1 IP: $IP |
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
version: "3.3" | |
services: | |
postgres: | |
image: postgres:latest | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: postgres | |
volumes: | |
- ./docker/containers/postgresql/data:/var/lib/postgresql/data | |
ports: |
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
#!/bin/bash | |
set -e | |
#optional change working directory | |
DIR=${1-$(pwd)} | |
cd $DIR | |
USER="Github username" | |
TOKEN=$GITHUB_TOKEN |
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
on idle | |
set vpnServiceName to "VPN NAME" | |
set connected to "" | |
delay 10 | |
try | |
set connected to do shell script "/usr/local/bin/kubectl get namespace --request-timeout 5s &> /dev/null && echo 1" | |
on error errorMessage number errorNumber | |
end try | |
log connected |
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 bash | |
kubectl -n kube-system describe secret $( | |
kubectl -n kube-system get secret | \ | |
awk '/^cluster-admin-dashboard-sa-token-/{print $1}' | |
) | \ | |
awk '$1=="token:"{print $2}' |