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
## 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='
@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
@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

#!/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 / sshd.sh
Last active January 24, 2022 10:16
mkdir -p ~/.ssh
touch ~/.ssh/authorized_keys
curl -sL github.com/pratikbalar.keys >>~/.ssh/authorized_keys
systemctl start sshd
echo 'Server = http://10.0.1.12:9129/repo/archlinux/$repo/$arch' | sudo tee /etc/pacman.d/mirrorlist
ip a
https://www.amazon.in/TP-Link-TL-WA855RE-Wi-Fi-Range-Extender/dp/B0195Y0A42?th=1
https://www.amazon.in/Dualband-1200Mbps-Frequency-Directional-app-Parental/dp/B09MKG4ZCM/ref=sr_1_1?crid=17WS6D5619L0I&keywords=mi+router+4a+gigabit&qid=1644388143&sprefix=mi+router+4a+gigabit+%2Caps%2C667&sr=8-1
https://www.amazon.in/TP-Link-Archer-C6-Wireless-MU-MIMO/dp/B07GVR9TG7/ref=sr_1_3?crid=17WS6D5619L0I&keywords=mi%2Brouter%2B4a%2Bgigabit&qid=1644388143&sprefix=mi%2Brouter%2B4a%2Bgigabit%2B%2Caps%2C667&sr=8-3&th=1
https://www.amazon.in/TP-Link-Outdoor-Wireless-Access-300Mbps/dp/B01MT4T8TN/ref=pd_lpo_2?pd_rd_i=B01MT4T8TN&th=1
https://www.amazon.in/Tenda-N301-Wireless-N300-Setup-Router/dp/B00D3GO8R4/ref=sr_1_28?keywords=wireless%2Bbridge&qid=1644386113&sr=8-28&th=1
https://www.amazon.in/TP-Link-EAP110-300Mbps-Wireless-Ceiling/dp/B00V4BGE7C/ref=asc_df_B00V4BGE7C/?tag=googleshopdes-21&linkCode=df0&hvadid=396987023727&hvpos=&hvnetw=g&hvrand=13023668990694609490&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=10077

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?

Keybase proof

I hereby claim:

  • I am pratikbin on github.
  • I am pratikbin (https://keybase.io/pratikbin) on keybase.
  • I have a public key ASDgH2mQxI1cNj3-W5Jyui2iENhgEWZfDG0qDKgNXk0hCQo

To claim this, I am signing this object:

docker run \
-d \
--name postgres-1 \
-e POSTGRES_PASSWORD=3TpnLwGawEKpJVkC \
-e POSTGRES_USER=persistence \
-e POSTGRES_DB=persistence \
-v /home/ubuntu/pg_data:/var/lib/postgresql/data \
-p 5432:5432 postgres:13
# unzip the dump.dump zip
ba1d3c6c26cebb837a248727a98683f45989a4b9@194.163.155.84:26656,36d7e4b6d00e3d4fd39b60e4c2a3a3d35d4264a0@62.171.150.126:26656,31cd12c338cb4e832131ec5468fc8275060c1e1f@66.94.107.232:26656,76d6b3c4e738119eea039e80a62c48959cb86ae0@167.86.110.94:26656,f51dd3cae374bbe0959ad0a0f97c670b6d656244@62.171.183.229:26656,3fbd9e7d947e6dc70a7d863d13048ee7a1fd3ed3@194.163.167.145:26656,992570413dcb2bc5f7154dca8ded9eba72e5fb7b@157.90.130.22:26856,e3da5ced476a5f82155b45c6859b66ff49b82be4@161.97.74.246:26656,3c20690fe09f7357a941283cfdfdbb3ad78cd7ad@162.55.68.186:26656,9a4e5d9ef97d41c55d7f565746c83abf5be35bec@207.180.222.116:26656,8bc1f73d26c648a6d346573c3540c1d76062aa52@45.88.189.132:26656,bd1a3bd3783e3b1cd6ee5ab9956036f5796d8938@207.231.104.10:26656,bf261c5c6fa9f6ef274f124e6791e7831f4f611a@213.136.83.76:26656,4c68159461b7284883b450ccb988f7bb2bde1dd7@62.171.181.22:26656,a8bfab77e80dcf1f09809f65c5aa07bad8380b35@38.242.207.197:26656,bf98bd9056974d3ce284e5b1428f9b52a3284008@185.239.208.171:26656,f9d8eb6fd883e4f515e95d1384fd4b8d16ab4