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
dynamic_title: true | |
live_config_reload: true | |
window: | |
opacity: 1.0 | |
startup_mode: Windowed | |
decorations: Full | |
dimensions: | |
lines: 45 | |
columns: 165 |
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 | |
REDIS_CLI_PREFIX="redis-cli" | |
DEFAULT_PORT=6379 | |
DEFAULT_DB=0 | |
log () { echo "[$(date +%Y-%m-%dT%H:%M:%S:%:z)] $@" >&2; } | |
usage () { |
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
" felipecwb's vim | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
if !filereadable(vimplug_exists) | |
if !executable("curl") | |
echoerr "You have to install curl or first install vim-plug yourself!" |
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
docker inspect -f '{{.State.Pid}}' my-container | |
pid=$(docker inspect -f '{{.State.Pid}}' my-container) | |
echo $pid | |
mkdir -p /var/run/netns | |
ln -s /proc/$pid/ns/net /var/run/netns/$pid | |
ip netns exec $pid ip route del default | |
docker network inspect my-network | |
ip netns exec $pid ip route add default via 172.16.238.1 | |
docker exec -it my-container sh |
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
load_env() { | |
if [ ! -f $1 ]; then | |
return 1 | |
fi | |
echo "> Loading $2 dotenv: $1" | |
awk '!/^#/{if ($1 != "") {print ">> " $0}}' $1 | |
source <(awk '!/^#/{if ($1 != "") {print "export " $0}}' $1) | |
} |
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
export EDITOR=vim | |
export VISUAL=vim | |
alias vim=nvim | |
alias grep='grep --color' | |
alias ls='ls --color' | |
alias ll='ls -lsh' | |
alias lla='ll -a' | |
[ -s "$HOME/.nvm/nvm.sh" ] && source "$HOME/.nvm/nvm.sh" |
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
FROM alpine:3.8 | |
ENV USER app | |
ENV GROUP app | |
ENV WORKDIR /home/app | |
ENV PHPFPM_SOCK /tmp/php-fpm7.sock | |
# USER | |
RUN addgroup -g 1000 $GROUP \ | |
&& adduser -S -u 1000 -G $GROUP $USER |
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
version: "3.7" | |
services: | |
reverse-proxy: | |
image: traefik | |
command: | |
- "--docker" | |
- "--docker.swarmMode" | |
- "--docker.watch" | |
- "--docker.exposedbydefault=false" |
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 | |
endpoint="$1" | |
domain="$(echo $endpoint | cut -d'/' -f3)" | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ |
NewerOlder