Skip to content

Instantly share code, notes, and snippets.

View eguven's full-sized avatar

Eren Güven eguven

View GitHub Profile
@eguven
eguven / cleanup_ecr.py
Created August 9, 2019 18:27
Cleanup ECR by deleting old images
#!/usr/bin/env python
# Clean up tagged/untagged ECR images by age
# You need to set AWS_DEFAULT_REGION environment variable if you're deleting from an ECR
# repository outside your configured default region
#
# python cleanup_ecr.py --registry-id 123456789000 --repository-name ecr-foobar \
# --untagged-age 1 --tagged-age 30 --dry-run
import argparse
@eguven
eguven / example.py
Created October 8, 2019 15:18
Example for changing python module scope
import importlib
m = importlib.import_module('mypackage.mymodule')
def foo():
return 42
m.foo = foo
@eguven
eguven / .bash_sourced_k8s.sh
Created January 23, 2020 16:38
Shell functions to quickly show and switch kubernetes contexts.
function k-enabled() {
if [ ! -z "$PS1_LAST" ]; then
return 0
fi
return 1
}
# show current context
function k-on() {
if k-enabled; then
@eguven
eguven / csgo_convars.md
Last active May 6, 2024 14:38
List of CS:GO Cvars

Generated from List of CS:GO Cvars on 2020-12-07.

Protocol version 13752 [1105/1105]
Exe version 1.37.5.2 (csgo)
Exe build: 16:34:06 May 7 2020 (7852) (730)

1941 convars total.