Skip to content

Instantly share code, notes, and snippets.

@jubel-han
jubel-han / get_model_receivers.py
Created August 29, 2019 07:47
Get Django Model Receivers
from django.db.models import signals
# list_model_receivers(Model_Name)
# e.g.
# >>> list_model_receivers(MyModel)
def list_model_receivers(model):
for k, v in vars(signals).items():
if not isinstance(v, signals.ModelSignal):
@jubel-han
jubel-han / is_docker_image_exists.sh
Created June 24, 2019 09:59
Inspecting if the docker image with specified tag exists from docker hub registry
#!/bin/bash
# INPUT:
# ENV Variables:
# DOCKER_USERNAME
# DOCKER_PASSWORD
# IMAGE_NAME
# IMAGE_TAG
# OUTPUT:
@jubel-han
jubel-han / helm-cheatsheet.md
Created July 17, 2018 07:49 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
@jubel-han
jubel-han / iterm2-solarized.md
Created July 4, 2018 05:50 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@jubel-han
jubel-han / gitlab-runner-config.toml
Created April 3, 2018 10:38
gitlab runner configuration with docker executor
concurrent = 2
check_interval = 2
[[runners]]
name = "gcp-runner"
url = "https://gitlab.com/"
token = "xxxxxx"
executor = "docker"
[runners.docker]
tls_verify = false
@jubel-han
jubel-han / GitConfigHttpProxy.md
Created January 23, 2018 04:55 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

get python dependency graph
install snake food
sudo apt-get install snakefood
http://furius.ca/snakefood/
install graphviz
@jubel-han
jubel-han / google_ip_range.md
Last active August 29, 2024 15:12
Google public IP ranges

STMP SPF IP RANGE:

64.233.160.0/19
66.102.0.0/20
66.249.80.0/20
72.14.192.0/18
74.125.0.0/16
108.177.8.0/21

Keybase proof

I hereby claim:

  • I am jubel-han on github.
  • I am jubel (https://keybase.io/jubel) on keybase.
  • I have a public key ASAaHVEZ611Q8vwk8DToz6J5aD9h1wq9vwQD34k1T1PZwQo

To claim this, I am signing this object:

@jubel-han
jubel-han / pipeline_venv_workarounds.groovy
Created April 13, 2017 08:14
Jenkins pipeline python virtualenv workarounds
node {
stage 'Checkout and Build'
createVirtualEnv 'env'
executeIn 'env', 'pip install -r requirements.txt'
executeIn 'env', './manage.py test'
executeIn 'env', './manage.py integration-test'
virtualEnv('true')
runCmd('pip install -r requirements.txt')