Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / redis_key_sizes.sh
Created March 27, 2017 08:52 — forked from epicserve/redis_key_sizes.sh
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}
@jubel-han
jubel-han / Jenkinsfile
Created December 4, 2016 13:50 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@jubel-han
jubel-han / gist:4ac67206198a13211b5a9516016cbab8
Created November 23, 2016 14:50 — forked from daicham/gist:1955543
Print the methods of Jenkins inner object on script console
//all job name
jenkins.model.Jenkins.instance.items.each {
println "Job: ${it.name}"
}
//method list of Jenkins instance
jenkins.model.Jenkins.instance.class.methods.each {
println "Jenkins method: ${it.name}"
}
@jubel-han
jubel-han / ciSeedJob.groovy
Created November 4, 2016 03:34 — forked from marcelbirkner/ciSeedJob.groovy
Jenkins Job DSL Seed Job for Continuous Integration Jobs
import groovy.sql.Sql
import java.util.Date
import java.text.SimpleDateFormat
/*
* THIS IS AN EXAMPLE SNIPPET. FOR MORE DETAILS SEE THE FOLLOWING BLOG ARTICLE:
* https://blog.codecentric.de/en/?p=30502
*
* This Jenkins Job DSL Groovy Script creates Continuous Integration (CI) Jobs
* for all Maven & Ant projects that exist on a GitLab Server.
@jubel-han
jubel-han / locust-wrapper.py
Created August 16, 2016 09:55 — forked from wiebren/locust-wrapper.py
Locust MonKit wrapper for Jenkins
import argparse
import subprocess
import sys
import re
from collections import defaultdict
from lxml import etree
report = ["Min", "Avg", "Median", "95%", "99%"]
@jubel-han
jubel-han / migrate-redis.py
Last active September 5, 2016 07:43 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.