Skip to content

Instantly share code, notes, and snippets.

@mpaloni
mpaloni / cheatsheet.sh
Last active March 20, 2025 13:14
gcloud cli
gcloud config configurations create my-profile
gcloud config set account [email protected]
gcloud config configurations list
gcloud config configurations activate my-profile
gcloud auth application-default login

Create a workload for debugging

kubectl run python-workload --image=python:3.12-slim --restart=Never --command -- /bin/bash -c "sleep 3600"

Run exec in default namespace, optionally add --namespace my-namespace to assing namespace

kubectl exec -it python-workload -- /bin/bash

Delete the workload after

kubectl delete pod python-workload

@mpaloni
mpaloni / setup vscode.md
Last active November 5, 2024 08:18
poetry
# List all used ports
sudo netstat -tulpn | grep LISTEN
@mpaloni
mpaloni / redis
Last active October 23, 2024 08:06
Docker gists
# Redis
docker run --rm -it --name redis-stack --network="host" redis/redis-stack:latest
docker run --rm -it --name redisinsight --network="host" redis/redisinsight:latest
@mpaloni
mpaloni / avoid rebase hell.md
Last active November 15, 2024 12:26
git commands

https://blog.oddbit.com/post/2019-06-17-avoid-rebase-hell-squashing-wi/

Avoid rebase hell: squashing without rebasing

#git

You’re working on a pull request. You’ve been working on a pull request for a while, and due to lack of sleep or inebriation you’ve been merging changes into your feature branch rather than rebasing. You now have a pull request that looks like this (I’ve marked merge commits with the text [merge]):

7e181479 Adds methods for widget sales
@mpaloni
mpaloni / bootstrapping_example.ipynb
Created June 26, 2024 11:07
Bootstrapping sample means example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.