This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# username: admin , password: 123 , hash command : htpasswd -nb -B admin 123 | cut -d ":" -f 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cloud.domain.com:443 { | |
header Strict-Transport-Security max-age=31536000; | |
reverse_proxy localhost:11000 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt_wikimatze_precmd { | |
git-info | |
} | |
function prompt_wikimatze_setup { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS | |
prompt_opts=(cr percent subst) | |
# Load required functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eu # do not proceed on error | |
if [ $# -lt 1 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then | |
cat <<EOF | |
Quick command to get a shell inside a running docker container. | |
Usage: dexec [container_name] [command] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please use "#!/usr/bin/env bash" instead of directly linking bash with "#!/bin/bash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Originally from detro (Ivan De Marino) | |
# https://github.com/detro/.bashrc.d/blob/master/.init.sh | |
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &>/dev/null && pwd )" | |
# Common utilities | |
case "${OSTYPE}" in | |
solaris*) OSNAME="SOLARIS" ;; | |
darwin*) OSNAME="MACOSX" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Common utilities | |
case "${OSTYPE}" in | |
solaris*) OSNAME="SOLARIS" ;; | |
darwin*) OSNAME="MACOSX" ;; | |
linux*) OSNAME="LINUX" ;; | |
bsd*) OSNAME="BSD" ;; | |
msys*) OSNAME="WINDOWS" ;; | |
*) OSNAME="${OSTYPE}" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list all tags | |
git fetch --all --tags --prune | |
# sort git tags by date | |
git for-each-ref --sort=taggerdate --format '%(tag)_,,,_%(taggerdate:raw)_,,,_%(taggername)_,,,_%(subject)' refs/tags | awk 'BEGIN { FS = "_,,,_" } ; { t=strftime("%Y-%m-%d %H:%M",$2); printf "%-20s %-18s %-25s %s\n", t, $1, $4, $3 }' | |
# delete all local tags, and update with list of remote tags | |
git tag -l | xargs git tag -d && git fetch -t | |
# get list of all author's emails of the repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fork from https://github.com/gkotian/gautam_linux/blob/master/scripts/colours.sh | |
# Script to show the colours used for different file types | |
# This is just a more readable version of the 'eval' code at: | |
# http://askubuntu.com/a/17300/309899 | |
# A nice description of the colour codes is here: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your ~/.bashrc file | |
# Use .bashrc.d directory instead of bloated .bashrc file | |
# From: https://waxzce.medium.com/use-bashrc-d-directory-instead-of-bloated-bashrc-50204d5389ff | |
BASHRC_DIR="${HOME}/.bashrc.d" | |
# Optionally create directory if not exists | |
if [ ! -d "${BASHRC_DIR}" ]; then | |
mkdir -p "${BASHRC_DIR}"; | |
chmod 700 "${BASHRC_DIR}"; | |
fi | |
# Load any *.bashrc files in ~/.bashrc.d/ |
NewerOlder