Skip to content

Instantly share code, notes, and snippets.

View pratikbin's full-sized avatar
☁️
Dev-Ops-ing

pratikbin pratikbin

☁️
Dev-Ops-ing
View GitHub Profile
#!/bin/bash -e
#
# Caching to persistence volume for self hosted ghar
[[ $DEBUG ]] && set -x
export PZSTD_NUM_THREADS=${PZSTD_NUM_THREADS:-"$(nproc)"}
[[ -z "${1}" ]] && echo "KEY is not set (arg 1)" >&2 && exit 2
[[ -z "${2}" ]] && echo "FROM is not set (arg 2)" >&2 && exit 2
[[ -z "${3}" ]] && echo "TO is not set (arg 3)" >&2 && exit 2
@pratikbin
pratikbin / README.md
Created October 4, 2021 09:20 — forked from e7d/README.md
[Debian] Build a Squid anonymous proxy from source code

If you don't want to build Squid from scratch, you can simply Setup a Squid anonymous proxy

Build a Squid anonymous proxy from source code

Please note that this whole manual refers to the version 3.5.23 of Squid. You probably would have to adapt some commands to the version you will actually download.

Table of contents

@pratikbin
pratikbin / youtube-dl-plurasight-course-download
Created August 19, 2021 15:58
Download Plurasight Courses with youtube-dl.md
create `youtube-dl.bat` file and paste all this below code
> youtube-dl.exe --output "c:/YourDownloadPath/Pluralsight%%(playlist)s%%(chapter_number)s - %%(chapter)s%%(playlist_index)s - %%(title)s.%%(ext)s" --cookies "pluralsight_cookie.txt" --no-overwrites --no-post-overwrites --verbose --write-sub --rate-limit 1M --add-header Referer:"https://app.pluralsight.com/library/courses" --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.62" --batch-file=batch_filelist_pluralsight.txt
> pause
* Go to https://www.whatismybrowser.com/detect/what-is-my-user-agent make a note of your user agent i.e. `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 Edg/92.0.902.62`
* Install [EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg) extension, go to settings and set format (defaults to JSON) to Netscape HTTP Co
## Delete namespace from terminating state
kubectl get namespace "stucked-namespace" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/stucked-namespace/finalize -f -
## Delete cascade in sts
kc delete sts --cascade=false
## Secret decode
kc -n <namespace-name> get secret <secret-name> -o go-template='