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
syntax_version: "7" | |
docker_image: calbertts/node-gtk | |
enable_gui: true | |
container_working_directory: /app | |
work_in_project_folder_as: /app | |
volumes: | |
main: | |
host_path: . | |
container_path: /app | |
macros: |
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
runc() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local image=$(docker images --format '{{.Repository}}:{{.Tag}}' | fzf-tmux --reverse --multi) | |
if [[ $image != '' ]]; then | |
echo -e "\n \033[1mDocker image:\033[0m" $image | |
read -e -p $' \e[1mOptions: \e[0m' -i "-it --rm" options | |
printf " \033[1mChoose the command: \033[0m" | |
local cmd=$(echo -e "/bin/bash\nsh" | fzf-tmux --reverse --multi) | |
if [[ $cmd == '' ]]; then |
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
runinc() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local container=$(docker ps --format '{{.Names}} => {{.Image}}' | fzf-tmux --reverse --multi | awk -F '\\=>' '{print $1}') | |
if [[ $container != '' ]]; then | |
echo -e "\n \033[1mDocker container:\033[0m" $container | |
read -e -p $' \e[1mOptions: \e[0m' -i "-it" options | |
if [[ $@ == '' ]]; then | |
read -e -p $' \e[1mCommand: \e[0m' cmd | |
else | |
cmd="$@" |
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
# Stops and/or removes a docker container | |
stopc() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local container=$(docker ps --format '{{.Names}} => {{.Image}}' | fzf-tmux --reverse --multi | awk -F '\\=>' '{print $1}') | |
if [[ $container != '' ]]; then | |
echo -e "\n \033[1mDocker container:\033[0m" $container | |
printf " \033[1mRemove?: \033[0m" | |
local cmd=$(echo -e "No\nYes" | fzf-tmux --reverse --multi) | |
if [[ $cmd != '' ]]; then | |
if [[ $cmd == 'No' ]]; then |
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
showipc() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local container=$(docker ps -a --format '{{.Names}} => {{.Image}}' | fzf-tmux --reverse --multi | awk -F '\\=>' '{print $1}') | |
if [[ $container != '' ]]; then | |
local network=$(docker inspect $container -f '{{.NetworkSettings.Networks}}' | awk -F 'map\\[|:' '{print $2}') | |
echo -e "\n \033[1mDocker container:\033[0m" $container | |
history -s showipc | |
history -s docker inspect -f "{{.NetworkSettings.Networks.${network}.IPAddress}}" $container | |
echo -e " \033[1mNetwork:\033[0m" $network |
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
"Figitive color scheme | |
hi DiffAdd guifg=NONE ctermfg=NONE guibg=#464632 ctermbg=238 gui=NONE cterm=NONE | |
hi DiffChange guifg=NONE ctermfg=NONE guibg=#335261 ctermbg=239 gui=NONE cterm=NONE | |
hi DiffDelete guifg=#f43753 ctermfg=203 guibg=#79313c ctermbg=237 gui=NONE cterm=NONE | |
hi DiffText guifg=NONE ctermfg=NONE guibg=NONE ctermbg=NONE gui=reverse cterm=reverse | |
"New line without insert mode | |
nnoremap <C-J> a<CR><Esc>k$ | |
"Enable mouse |
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
startc() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local container=$((docker ps -a --filter status=exited --format '{{.Names}} => {{.Image}} => EXITED' & docker ps -a --filter status=created --format '{{.Names}} => {{.Image}} => CREATED') | fzf-tmux --reverse --multi | awk -F '\\=>' '{print $1}') | |
if [[ $container != '' ]]; then | |
echo -e "\n \033[1mDocker container:\033[0m" $container | |
echo -e "\n Starting $container ...\n" | |
history -s startc | |
history -s docker start $container | |
docker start $container > /dev/null | |
fi |
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
removec() { | |
export FZF_DEFAULT_OPTS='--height 90% --reverse --border' | |
local container=$((docker ps -a --filter status=exited --format '{{.Names}} => {{.Image}} => EXITED' & docker ps -a --filter status=created --format '{{.Names}} => {{.Image}} => CREATED') | fzf-tmux --reverse --multi | awk -F '\\=>' '{print $1}') | |
if [[ $container != '' ]]; then | |
echo -e "\n \033[1mDocker container:\033[0m" $container | |
printf " \033[1mAre you sure?: \033[0m" | |
local cmd=$(echo -e "No\nYes" | fzf-tmux --reverse --multi) | |
if [[ $cmd != '' ]]; then | |
if [[ $cmd == 'Yes' ]]; then | |
echo -e " Removing $container ...\n" |
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 color_my_prompt { | |
local __user_and_host="@\u" | |
local __cur_location="\[\033[01;34m\]\W" | |
local __git_branch_color="\[\033[32m\]" | |
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\\(.+\)$/\\\\\\1\\ /`' | |
local __prompt_tail="\[\033[35m\]$" | |
local __last_color="\[\033[00m\]" | |
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color " | |
} | |
color_my_prompt |
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
let g:loaded_youcompleteme = 1 | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent execute "!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" | |
autocmd VimEnter * PlugInstall | source $MYVIMRC | |
endif | |
" Kepp selected test when fixing indentation | |
vnoremap < <gv | |
vnoremap > >gv |
OlderNewer