Skip to content

Instantly share code, notes, and snippets.

View palnabarun's full-sized avatar
🐼
Breaking the world!

Nabarun Pal palnabarun

🐼
Breaking the world!
View GitHub Profile
@palnabarun
palnabarun / infosec_newbie.md
Created August 10, 2017 17:30 — forked from mubix/infosec_newbie.md
How to start in Infosec
@palnabarun
palnabarun / determining_owner.md
Last active September 9, 2019 20:29
ContribSummitNA2019

Goals

  • given an username, say whether the user is an owner in any repo in the kubernetes organizations
  • the username should not be marked as an owner if the user shows up only in kubernetes-sigs/contributot-playground's OWNERS files

Method

From cs.k8s.io, it is seen that we can get the OWNER stats for an user from this URL:

https://cs.k8s.io/api/v1/search?stats=fosho&repos=*&rng=%3A20&q=<username>&i=fosho&files=OWNERS

Keybase proof

I hereby claim:

  • I am palnabarun on github.
  • I am nabarun (https://keybase.io/nabarun) on keybase.
  • I have a public key whose fingerprint is 5766 AE48 2884 5256 325B DA6E 611D 5079 D826 B150

To claim this, I am signing this object:

switch_gcp () {
if [ -z $1 ]
then
echo "No profile name passed."
exit 1
fi
GCP_CRED_HOME=$HOME/.gcloud_credentials
GCP_CRED_FILE=$GCP_CRED_HOME/$1.json
if [ ! -f $GCP_CRED_FILE ]
then
@palnabarun
palnabarun / Dockerfile
Created June 2, 2020 18:57
Dockerfile to create an image with just kubectl. NOT FOR PRODUCTION
FROM ubuntu:18.04
RUN apt update && apt install -y curl
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.2/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/bin/kubectl
CMD ["sleep", "3600"]
[2020-07-07 19:35:29] <nabarun> #startclass
[2020-07-07 19:35:29] <chekov> ----BEGIN CLASS----
[2020-07-07 19:35:33] <nabarun> Roll Class
[2020-07-07 19:35:38] <nabarun> s/Class/Call
[2020-07-07 19:35:38] <schubisu> Robin Schubert
[2020-07-07 19:35:42] <raydeeam> Rayan Das
[2020-07-07 19:35:43] <snowmanstark> Philemon Johnson
[2020-07-07 19:35:49] <BhaveshSGupta> Bhavesh Gupta
[2020-07-07 19:35:51] <sayan> Sayan Chowdhury
[2020-07-07 19:35:51] <sahilister[m]> Sahil Dhiman
@palnabarun
palnabarun / new.py
Last active September 4, 2020 10:10
Running the function v/s passing a callable. old.py from https://twitter.com/sunishsurendran/status/1301786397544570881
import concurrent
import time
def execute(count):
start_time = time.time()
with concurrent.futures.ProcessPoolExecutor() as executor:
for _ in range(count):
executor.submit(time.sleep, 1)
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/google/go-github/github"
flag "github.com/spf13/pflag"