Skip to content

Instantly share code, notes, and snippets.

View rizerzero's full-sized avatar
🎯
Focusing

Juba B rizerzero

🎯
Focusing
View GitHub Profile
@rizerzero
rizerzero / ec2tools
Created March 20, 2019 09:54
Some useful bash scrips for AWS EC2. See how to use them at https://mexapi.macpress.com.br/2015/05/mail-calendar-server-p1.html
Hello,human. This is just for the gist title.
@rizerzero
rizerzero / .gitignore
Created May 12, 2019 12:57 — forked from gquemener/.gitignore
SuperMemo 2 PHP Implementation
composer.lock
/vendor
@rizerzero
rizerzero / gitflow-breakdown.md
Created July 10, 2019 14:54 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

gfinit(){
git config gitflow.branch.master master
git config gitflow.branch.develop develop
git symbolic-ref HEAD refs/heads/master
git commit --allow-empty --quiet -m "Initial commit"
git branch --no-track develop master
git checkout -B develop
git config gitflow.prefix.feature feature-
git config gitflow.prefix.bugfix bugfix-
@rizerzero
rizerzero / Alias command
Last active July 11, 2019 08:37 — forked from bclinkinbeard/release.sh
Bash script to automate the Git Flow tag/release process and maintain release number file.
release(){
#!/bin/bash
# current Git branch
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
# v1.0.0, v1.5.2, etc.
versionLabel=v$1
# establish branch and tag name variables
@rizerzero
rizerzero / .zshrc
Created August 28, 2019 10:35 — forked from zserge/.zshrc
autoload -U compinit colors vcs_info
colors
compinit
REPORTTIME=3
HISTFILE=~/.zhistory
HISTSIZE=5000
SAVEHIST=5000
setopt INC_APPEND_HISTORY
setopt EXTENDED_HISTORY
@rizerzero
rizerzero / 1a-steps.md
Created December 2, 2019 16:41 — forked from kacole2/1a-steps.md
Kubernetes 1.14.1 Installation using kubeadm on vSphere with CentOS7

Steps to Install Kubernetes on CentOS7 with Kubeadm and vSphere

  1. On the master node: Edit the vsphere.conf file within the kubeadm-master.sh to match your environment. Copy kubeadm-master.sh to the master node:
sudo chmod u+x kubeadm-master.sh
sudo ./kubeadm-master.sh
  1. On each worker node copy kubeadm-worker.sh:
@rizerzero
rizerzero / list_gcp_iprange.sh
Created March 31, 2021 08:06 — forked from n0531m/list_gcp_iprange.sh
Google Cloud Platform : ip address range
#!/bin/bash
# https://cloud.google.com/compute/docs/faq#find_ip_range
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
myarray=()
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`
do
myarray+=($LINE)
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :`
@rizerzero
rizerzero / load_dotenv.sh
Created April 12, 2021 13:04 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@rizerzero
rizerzero / traefik-redirect-path.md
Created May 12, 2021 13:21 — forked from kekru/traefik-redirect-path.md
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect