See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
echo -n "Really want to reset this node? (y/N): " | |
read -r check | |
if [[ "$check" = "y" ]]; then | |
echo "[INFO] Reset kubeadm" | |
kubeadm reset -f | |
echo "[INFO] Stop kubelet & docker service" | |
systemctl stop kubelet docker docker.socket | |
echo "[INFO] Remove K8S files" | |
rm -rvf /etc/kubernetes/* |
# Alex Ellis 2018 | |
# Example from: https://blog.alexellis.io/quick-look-at-google-kaniko/ | |
# Pre-steps: | |
# kubectl create secret generic docker-config --from-file $HOME/.docker/config.json | |
# Other potential optimizations (suggested by @errordeveloper) | |
# - Store "templates" in a permanent volume | |
# - Download source via "tar" instead of git clone |
#!/bin/bash | |
echo "[INFO] Deploying kube-flannel..." | |
echo -n "Image prefix (default: '', example: 'harbor.local/library/'): " | |
read -r image_prefix | |
echo $image_prefix | |
echo -n "cpu requests & limits(default: 100m): " | |
read -r resource_cpu | |
resource_cpu="${resource_cpu:='100m'}" |
#!python3 | |
import csv | |
from datetime import datetime | |
from os import listdir, path, makedirs, system | |
import json | |
DATE = datetime.now().strftime("%y%m%d") |
set nocompatible | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' "required | |
Plugin 'tpope/vim-fugitive' "required | |
Plugin 'Yggdroot/indentLine' | |
call vundle#end() | |
filetype plugin indent on |
#!/bin/bash | |
BASE_URL="https://osmdata.openstreetmap.de/download/" | |
POSTFIX=".zip" | |
names=("simplified-water-polygons-split-3857" "water-polygons-split-3857" "antarctica-icesheet-polygons-3857" "antarctica-icesheet-outlines-3857") | |
for (( i=0; i<${#names[@]}; i++)); do | |
wget ${BASE_URL}${names[i]}${POSTFIX} | |
unzip ${names[i]}${POSTFIX} |
create extension hstore; | |
create table if not exists planet_osm_line | |
( | |
osm_id bigint, | |
access text, | |
"addr:housename" text, | |
"addr:housenumber" text, | |
"addr:interpolation" text, | |
admin_level text, |
wget -O - https://gist.githubusercontent.com/JhoLee/e117475baf16294a3d6701165986b57d/raw/ab5faa508964fc02eca55b107bde749500fc1f3c/download_shapes.sh | bash | |
wget -O - https://gist.githubusercontent.com/JhoLee/f10843550431865b7030276f4fd3c8bf/raw/b772140330fb380f4561b298e75f1db27b3fa784/download_osm_pbf.sh | bash |
#!/bin/bash | |
# $1: osm_directory_path | |
## if directory exists, parse file lists, | |
EXT_LIST=(".osm" ".osm.pbf") | |
if [ -e $1 ]; then | |
# OSM2PGSQL |