Update
This commit is contained in:
parent
bf36a0c7be
commit
dd42626d60
19
.bashrc
19
.bashrc
|
@ -141,9 +141,9 @@ elif __have vi ; then
|
|||
elif __have nano ; then
|
||||
alias vi="$(__path_lookup nano)"
|
||||
fi
|
||||
alias v='log.err use vi'
|
||||
alias vim='log.err use vi'
|
||||
alias nvim='log.err use vi'
|
||||
alias v='log.err use vi; sleep 5 #'
|
||||
alias vim='log.err use vi; sleep 5 #'
|
||||
alias nvim='log.err use vi; sleep 5 #'
|
||||
|
||||
######################## default-option aliases (posix) ########################
|
||||
alias gdb='gdb -q'
|
||||
|
@ -165,7 +165,7 @@ alias watch='watch -tcn.1 ' # trailing space means complete aliases
|
|||
alias rm='rm -Iv'
|
||||
|
||||
########################## overwrite aliases (posix) ###########################
|
||||
alias make='compiledb make'
|
||||
alias make='compiledb make -j'
|
||||
alias cat='bat'
|
||||
|
||||
########################## navigation aliases (posix) ##########################
|
||||
|
@ -193,6 +193,15 @@ alias ll='\ls --width="${COLUMNS:-80}" --sort=time --time=mtime --color=auto --f
|
|||
alias l='\ls --width="${COLUMNS:-80}" --sort=time --time=mtime --color=auto --time-style=long-iso -bharZ1l'
|
||||
alias colors='bash -c "$(curl -sfkSL "https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw")"'
|
||||
alias s='echo sudo $(fc -nl -2 | head -1 | cut -c3-) ; eval sudo $(fc -nl -2 | head -1 | cut -c3-)' # cut -c2- for bash posix mode
|
||||
alias mstest="bash /home/tosuman/42_minishell_tester/tester.sh"
|
||||
alias rootshell='sudo python3 -c '\''import pty, os, fcntl, termios, struct;
|
||||
rows, cols = struct.unpack("hh", fcntl.ioctl(0, termios.TIOCGWINSZ, struct.pack("hh", 0, 0)));
|
||||
def set_winsize(fd, rows, cols):
|
||||
fcntl.ioctl(fd, termios.TIOCSWINSZ, struct.pack("HHHH", rows, cols, 0, 0))
|
||||
def read(fd):
|
||||
set_winsize(fd, rows, cols)
|
||||
return os.read(fd, 1024)
|
||||
pty.spawn("/bin/bash", read)'\'''
|
||||
|
||||
############################### CDPATHS (posix) ################################
|
||||
CDPATH="."\
|
||||
|
@ -666,5 +675,3 @@ complete -C backup_file backup_file
|
|||
|
||||
################################### sources ####################################
|
||||
__source_if "${HOME}/.userbashrc"
|
||||
|
||||
alias mstest="bash /home/tosuman/42_minishell_tester/tester.sh"
|
||||
|
|
|
@ -26,7 +26,11 @@ return require('packer').startup(function(use)
|
|||
use('vim-airline/vim-airline-themes')
|
||||
use('cacharle/c_formatter_42.vim')
|
||||
-- use('m4xshen/autoclose.nvim')
|
||||
use('takac/vim-hardtime')
|
||||
-- use('takac/vim-hardtime')
|
||||
use{
|
||||
'm4xshen/hardtime.nvim',
|
||||
requires = { { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" } }
|
||||
}
|
||||
use({
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v2.x',
|
||||
|
|
|
@ -49,8 +49,8 @@ local function save_profiles(threshold)
|
|||
end
|
||||
|
||||
time([[Luarocks path setup]], true)
|
||||
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1713773202/lib/lua/5.1/?.so"
|
||||
local package_path_str = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1720049189/share/lua/5.1/?/init.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?.lua;/home/tosuman/.cache/nvim/packer_hererocks/2.1.1720049189/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/tosuman/.cache/nvim/packer_hererocks/2.1.1720049189/lib/lua/5.1/?.so"
|
||||
if not string.find(package.path, package_path_str, 1, true) then
|
||||
package.path = package.path .. ';' .. package_path_str
|
||||
end
|
||||
|
@ -94,6 +94,11 @@ _G.packer_plugins = {
|
|||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/gruvbox",
|
||||
url = "https://github.com/ellisonleao/gruvbox.nvim"
|
||||
},
|
||||
["hardtime.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/hardtime.nvim",
|
||||
url = "https://github.com/m4xshen/hardtime.nvim"
|
||||
},
|
||||
harpoon = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/harpoon",
|
||||
|
@ -124,6 +129,11 @@ _G.packer_plugins = {
|
|||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/norme.nvim",
|
||||
url = "https://github.com/vinicius507/norme.nvim"
|
||||
},
|
||||
["nui.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/nui.nvim",
|
||||
url = "https://github.com/MunifTanjim/nui.nvim"
|
||||
},
|
||||
["null-ls.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
||||
|
@ -188,11 +198,6 @@ _G.packer_plugins = {
|
|||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
||||
url = "https://github.com/tpope/vim-fugitive"
|
||||
},
|
||||
["vim-hardtime"] = {
|
||||
loaded = true,
|
||||
path = "/home/tosuman/.local/share/nvim/site/pack/packer/start/vim-hardtime",
|
||||
url = "https://github.com/takac/vim-hardtime"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ domain="${1-}" # ex. nosu
|
|||
name="${2-}" # ex. bastion
|
||||
user="${3-}" # ex. root
|
||||
[ -z "${domain-}" ] && { echo "Missing domain (1st argument)"; usage; exit 1; }
|
||||
[ -z "${name-}" ] && { echo "Missing name (2st argument)"; usage; exit 2; }
|
||||
[ -z "${user-}" ] && { echo "Missing user (3st argument)"; usage; exit 3; }
|
||||
[ -z "${name-}" ] && { echo "Missing name (2nd argument)"; usage; exit 2; }
|
||||
[ -z "${user-}" ] && { echo "Missing user (3rd argument)"; usage; exit 3; }
|
||||
|
||||
conn="${domain-}_${name-}_${user-}"
|
||||
if [ -f ~/.ssh/"${domain-}"/"${conn-}" ]; then
|
||||
|
|
|
@ -13,7 +13,7 @@ curl () {
|
|||
output=$(timeout 5 curl -sfSL "$@") # strip trailing newline
|
||||
err=$? # save exit status
|
||||
printf '%s\n' "${output}" # add trailing newline
|
||||
[ $err = 0 ] && exit 0 # exit early, we got what we wanted
|
||||
[ $err = 0 ] && printf '%s' "${output}" | grep -qF -- http && exit 0 # exit early, we got what we wanted
|
||||
while [ -n "$1" ] && [ "${1}" = "$(printf %s "$1" | tr -d .)" ] ; do shift; done # find domain
|
||||
[ -z "$1" ] && domain="<unknown>" || domain="$1" # didn't find domain?
|
||||
[ $err = 124 ] && err "Timed out" # from timeout 5
|
||||
|
|
Loading…
Reference in New Issue