Skip to content

Instantly share code, notes, and snippets.

View zerodayyy's full-sized avatar
:shipit:

Dmytro Kovalenko zerodayyy

:shipit:
  • Kyiv, Ukraine
View GitHub Profile
@sloria
sloria / bobp-python.md
Last active July 24, 2024 02:53
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active July 25, 2024 08:41
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@pelson
pelson / example.ipynb
Last active February 21, 2024 16:05
Example of authenticating a GitHub app using jwt in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PurpleBooth
PurpleBooth / Dockerfile
Last active March 21, 2024 09:33
Create a static binary in go and put it in a from scratch docker container
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]
@ksmithut
ksmithut / .dockerignore
Last active June 2, 2024 21:43
Node Docker Compose nodemon
node_modules
@zerodayyy
zerodayyy / flatten.py
Created November 2, 2020 13:04
[Python] Flatten a list with arbitrary dimensions
def flatten(l, result=[]):
"""Flatten a list with arbitrary dimensions.
Args:
l (List[Any]): The list to flatten.
Returns:
List[Any]: Flattened list.
"""
@zerodayyy
zerodayyy / Kill-Stuck-Kubernetes-Namespace.md
Last active November 1, 2021 10:18
Kill stuck Kubernetes namespace

This snippet allows you to kill a Kubernetes Namespace that is stuck in Terminating state:

(
NAMESPACE=your-stuck-namespace
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
)