Skip to content

Instantly share code, notes, and snippets.

View thevtm's full-sized avatar

Vinícius Tabille Manjabosco thevtm

  • Rotterdam, Netherlands
View GitHub Profile
@thevtm
thevtm / gist:9bfef4056337ee4459ee9808db6dfb0b
Created December 11, 2020 14:59
Some usefull kubectl commands
#
# Some usefull kubectl commands
#
function kube-find-namespace() {
kubectl get namespaces | tail -n +2 | fzf -q "$1" | awk '/(.*)/ {print $1}'
}
function kube-app-pod() {
local namespace
namespace=$1
kubectl get pods --field-selector status.phase=Running -n "$namespace" | awk '/(.*)-app-(.*) / {print $1}' | head -n 1
@thevtm
thevtm / dev-db
Created July 1, 2022 13:26
Database Development Utilities
#!/bin/python
# This is a simple script to help save and restore the database during development.
# Usage:
# - dev-db save users
# - dev-db restore users
import sys
import os
@thevtm
thevtm / berlin-appointments.js
Last active November 3, 2023 00:33
Berlin Appointments Alert
// Constants
const APPOINTMENTS_CALENDAR_URL = "/terminvereinbarung/termin/all/120686/"
const WAIT_DURATION_MS = 3 * 60 * 1000
const INITIAL_STATE = "INIT_STATE"
const SETTING_UP_STATE = "SETTING_UP_STATE"
const CHECKING_APPOINTMENTS_STATE = "CHECKING_APPOINTMENTS_STATE"
const WAITING_STATE = "WAITING_STATE"
const ALARM_STATE = "ALARM_STATE"
@thevtm
thevtm / bot.ts
Last active March 28, 2025 02:03
Progress Knight Quest Bot
// Simple bot that executes an action after another that I made for the game Progress Knight Quest
// https://indomit.github.io/progress_knight_2/
// GitHub: https://github.com/indomit/progress_knight_2/
(() => {
try {
window.stop_bot();
} catch (_) {}
/* UTIL */