mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 05:29:09 -07:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3eb8a8e44 | ||
|
|
3afee0505b | ||
|
|
50b74fc06e | ||
|
|
74bf253950 | ||
|
|
434120cc90 | ||
|
|
97e23b3669 | ||
|
|
f9f3dd05c8 | ||
|
|
6e095d9fbc | ||
|
|
c25540a398 | ||
|
|
fae178e8ac | ||
|
|
15ea12d54b | ||
|
|
291de7b2c1 | ||
|
|
bbba28e166 | ||
|
|
27dc8fb22c | ||
|
|
a5f55034fa | ||
|
|
062da36145 | ||
|
|
9e3b929a4b | ||
|
|
3170a41c4b | ||
|
|
b37f95383c | ||
|
|
e6e66b0d05 | ||
|
|
6e6b63cb28 | ||
|
|
20bb942ac6 | ||
|
|
d256cdf12b | ||
|
|
c20739472f | ||
|
|
66e6833623 | ||
|
|
bc5f9a2741 | ||
|
|
04d4ab4d25 | ||
|
|
ce1d4780b6 | ||
|
|
8e79910857 | ||
|
|
999ef09790 | ||
|
|
2f9841e2ac | ||
|
|
2879f63aff | ||
|
|
79a3e1f46c | ||
|
|
62392e3712 | ||
|
|
9717fef420 | ||
|
|
3c83cb1761 | ||
|
|
2a71557663 | ||
|
|
b6a2b65704 | ||
|
|
398e39b9eb |
@@ -26,5 +26,8 @@ function verify_dest {
|
||||
|
||||
verify_dest "$DEST"
|
||||
|
||||
exec nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
|
||||
time nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
|
||||
--delete-excluded "${HOME}/" "$DEST"
|
||||
echo "Backup completed..."
|
||||
time sync
|
||||
echo "Run finished, safe to unmount."
|
||||
|
||||
@@ -184,6 +184,7 @@ case ${TOOL} in
|
||||
rm /tmp/mitmproxy.tar.gz
|
||||
add_bin_symlink mitmproxy
|
||||
add_bin_symlink mitmweb
|
||||
add_bin_symlink mitmdump
|
||||
;;
|
||||
esp)
|
||||
makedest_or_die
|
||||
@@ -340,6 +341,21 @@ EOF
|
||||
chmod +x ${DESTDIR}/tmpmail
|
||||
add_bin_symlink tmpmail
|
||||
;;
|
||||
gf)
|
||||
install_pkgs golang-go silversearcher-ag
|
||||
go get -u github.com/tomnomnom/gf
|
||||
mkdir -p ${HOME}/.config
|
||||
git clone https://github.com/Matir/gf-patterns.git ${HOME}/.config/gf
|
||||
;;
|
||||
ffuf)
|
||||
go get -u github.com/ffuf/ffuf
|
||||
;;
|
||||
gobuster)
|
||||
go get -u github.com/OJ/gobuster
|
||||
;;
|
||||
amass)
|
||||
go get -u github.com/OWASP/Amass/cmd/amass
|
||||
;;
|
||||
*)
|
||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||
echo "Options:" >/dev/stderr
|
||||
|
||||
62
bin/screenshot.sh
Executable file
62
bin/screenshot.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Screenshot tool to try a few different tools
|
||||
|
||||
set -ue
|
||||
|
||||
TOOLS="flameshot scrot"
|
||||
SCREENDIR=${SCREENDIR:-${HOME}/Pictures/Screenshots}
|
||||
SCROT_FORMAT="%F-%T.png"
|
||||
|
||||
function default_screenshot_command {
|
||||
for tool in ${TOOLS} ; do
|
||||
if which "${tool}" >/dev/null 2>&1 ; then
|
||||
echo "${tool}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
||||
TOOL=${SHOT:-$(default_screenshot_command)}
|
||||
CMD=${1:-region}
|
||||
|
||||
function flameshot_gui_capture {
|
||||
flameshot gui -p "${SCREENDIR}"
|
||||
}
|
||||
|
||||
function flameshot_region_capture {
|
||||
flameshot_gui_capture
|
||||
}
|
||||
|
||||
function flameshot_window_capture {
|
||||
flameshot_gui_capture
|
||||
}
|
||||
|
||||
function flameshot_full_capture {
|
||||
flameshot full -p "${SCREENDIR}"
|
||||
}
|
||||
|
||||
function scrot_region_capture {
|
||||
scrot -s "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
function scrot_window_capture {
|
||||
scrot -u "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
function scrot_full_capture {
|
||||
scrot "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
case "${CMD}" in
|
||||
region|window|full)
|
||||
mkdir -p "${SCREENDIR}"
|
||||
${TOOL}_${CMD}_capture
|
||||
exit $?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [region|window|full]" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -50,3 +50,6 @@ alias ipy="ipython3"
|
||||
|
||||
# Skip the header on bc
|
||||
alias bc="command bc -q"
|
||||
|
||||
# Get a decently readable df
|
||||
alias dfh="df -h -x tmpfs -x devtmpfs"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=47
|
||||
sort_direction=1
|
||||
hide_threads=0
|
||||
sort_key=46
|
||||
sort_direction=-1
|
||||
tree_sort_key=0
|
||||
tree_sort_direction=1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
shadow_other_users=0
|
||||
@@ -12,15 +13,27 @@ show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=0
|
||||
tree_view=0
|
||||
tree_view_always_by_pid=0
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
cpu_count_from_one=1
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=6
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
left_meters=AllCPUs Memory Swap
|
||||
left_meter_modes=1 1 1
|
||||
right_meters=Tasks LoadAverage Uptime
|
||||
right_meter_modes=2 2 2
|
||||
hide_function_bar=0
|
||||
|
||||
@@ -158,20 +158,15 @@ bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
|
||||
|
||||
# screenshots
|
||||
set $scrotformat %F-%T.png
|
||||
set $screendir ~/Pictures/Screenshots
|
||||
# whole screen
|
||||
# region/selection
|
||||
bindsym --release Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot $screendir/$scrotformat
|
||||
# current window
|
||||
~/bin/screenshot.sh region
|
||||
# full screen
|
||||
bindsym --release Shift+Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot -u $screendir/$scrotformat
|
||||
# selection
|
||||
~/bin/screenshot.sh full
|
||||
# single window
|
||||
bindsym --release $alt+Sys_Req exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot -s $screendir/$scrotformat
|
||||
~/bin/screenshot.sh window
|
||||
|
||||
# useful utilities
|
||||
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets
|
||||
|
||||
@@ -46,7 +46,7 @@ export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
|
||||
|
||||
# Setup locale
|
||||
if test -x /usr/bin/locale ; then
|
||||
for l in en_US.utf8 C.UTF-8 C ; do
|
||||
for l in en_US.utf8 en_US.UTF-8 C.UTF-8 C ; do
|
||||
if /usr/bin/locale -a | grep -q "${l}" ; then
|
||||
export LC_CTYPE=${l}
|
||||
export LC_NUMERIC=${l}
|
||||
|
||||
@@ -69,3 +69,5 @@
|
||||
path = ~/.gitconfig.local
|
||||
[pull]
|
||||
rebase = false
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
.arduino*
|
||||
.bundle
|
||||
.cache
|
||||
.dropbox-dist
|
||||
.gradle
|
||||
.histfile
|
||||
.local/share/Steam
|
||||
.local/share/Trash
|
||||
.local/lib
|
||||
.rvm*
|
||||
.sliver
|
||||
.sqlite_history
|
||||
.thumbnails
|
||||
.wine
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
REMOTE_LINK="${HOME}/.ssh/remote_agent.sock"
|
||||
# Roughly based on this article:
|
||||
# https://werat.github.io/2017/02/04/tmux-ssh-agent-forwarding.html
|
||||
|
||||
if test \! -e "${REMOTE_LINK}" -a -n "${SSH_AUTH_SOCK}" ; then
|
||||
REMOTE_LINK="${HOME}/.ssh/ssh_auth_sock"
|
||||
|
||||
if [ "${1:-}" = "force" ] && [ -S "${SSH_AUTH_SOCK}" ] ; then
|
||||
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test \! -S "${REMOTE_LINK}" -a -S "${SSH_AUTH_SOCK}" ; then
|
||||
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
|
||||
fi
|
||||
|
||||
# Handle X forwarding, per sshd(8)
|
||||
if read proto cookie && [ -n "$DISPLAY" ]; then
|
||||
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
|
||||
# X11UseLocalhost=yes
|
||||
echo add unix:`echo $DISPLAY |
|
||||
cut -c11-` $proto $cookie
|
||||
else
|
||||
# X11UseLocalhost=no
|
||||
echo add $DISPLAY $proto $cookie
|
||||
fi | xauth -q -
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Update environment on reconnect
|
||||
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||
|
||||
# Use symlink socket
|
||||
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
|
||||
|
||||
# Custom binds
|
||||
bind K confirm kill-server
|
||||
bind X confirm kill-window
|
||||
|
||||
Submodule dotfiles/tmux/tmux-logging updated: b085ad423b...4717cbd4c8
Submodule dotfiles/vim/pack/matir/opt/solarized8 updated: 9afbe12f68...7b6399093c
Submodule dotfiles/vim/pack/matir/start/ctrlp updated: 2e773fd8c7...3866ae170a
Submodule dotfiles/vim/pack/matir/start/editorconfig updated: c718cefc51...8f6eba5fd6
Submodule dotfiles/vim/pack/matir/start/fugitive updated: 35f1095f9b...89e6b5e4e1
Submodule dotfiles/vim/pack/matir/start/surround updated: fab8621670...f51a26d371
Submodule dotfiles/vim/pack/matir/start/syntastic updated: 0336c35c0b...dd22667306
Submodule dotfiles/vim/pack/matir/start/vim-go updated: 13128e5f30...b919c60a6d
@@ -23,7 +23,8 @@ set expandtab
|
||||
set shiftround
|
||||
set backspace=indent,eol,start
|
||||
" Shift-tab to go backwards in insert mode
|
||||
imap <S-Tab> <Esc><<A
|
||||
" Does not work with YCM
|
||||
inoremap <S-Tab> <C-d>
|
||||
|
||||
" Line numbering, ruler
|
||||
set number
|
||||
|
||||
@@ -89,6 +89,7 @@ bindkey "^[[3~" delete-char
|
||||
# Source extras and aliases if interactive
|
||||
if [[ $- == *i* ]] ; then
|
||||
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
|
||||
if [[ -e $HOME/.aliases.local ]] ; then source $HOME/.aliases.local ; fi
|
||||
# zsh-only-ism to avoid error if glob doesn't expand
|
||||
for file in $HOME/.zshrc.d/[a-zA-Z0-9]*.zsh(N) ; do
|
||||
source "$file"
|
||||
@@ -119,6 +120,14 @@ if [[ $- == *i* ]] ; then
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
fi
|
||||
# Suggestions
|
||||
if test -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ; then
|
||||
# Works well for solarized
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
|
||||
# Strategy -- note that 'completion' is slow AF
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history)
|
||||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
fi
|
||||
fi # End interactive-only block
|
||||
|
||||
# In case ack is named ack-grep
|
||||
|
||||
5
dotfiles/zshrc.completions/_gf
Normal file
5
dotfiles/zshrc.completions/_gf
Normal file
@@ -0,0 +1,5 @@
|
||||
#compdef gf
|
||||
|
||||
function _gf {
|
||||
_arguments "1: :($(gf -list))"
|
||||
}
|
||||
9
dotfiles/zshrc.d/dmesg.zsh
Normal file
9
dotfiles/zshrc.d/dmesg.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
function dmesg {
|
||||
if [ $(id -u) -eq 0 ] ; then
|
||||
command dmesg "$@"
|
||||
elif id | grep -q '(sudo)' ; then
|
||||
sudo dmesg "$@"
|
||||
else
|
||||
command dmesg "$@"
|
||||
fi
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
if which ipython >/dev/null 2>/dev/null ; then
|
||||
if command -v ipython >/dev/null || command -v ipython3 >/dev/null ; then
|
||||
export PYTHONSTARTUP="${HOME}/.ipython.py"
|
||||
fi
|
||||
|
||||
@@ -10,8 +10,8 @@ zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns '<->.<->.<->.<-
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns adm bin daemon halt lp named shutdown sync
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}##\|*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
|
||||
7
dotfiles/zshrc.d/vmstat.zsh
Normal file
7
dotfiles/zshrc.d/vmstat.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
function vmstat {
|
||||
local _extra_args
|
||||
if [ "$(tput cols)" -gt 80 ] ; then
|
||||
_extra_args="-w"
|
||||
fi
|
||||
command vmstat ${_extra_args} "$@"
|
||||
}
|
||||
@@ -181,7 +181,7 @@ install_gpg_keys() {
|
||||
return 0
|
||||
local key
|
||||
for key in ${BASEDIR}/keys/gpg/* ; do
|
||||
gpg --import < ${key} >/dev/null
|
||||
gpg --import < ${key} >/dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
@@ -433,3 +433,5 @@ case $OPERATION in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "OK"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClvMvarQvGaFYhUazA+GN0C2XaU4vHmsvD3G99PJqmd9SGrzSvWw2ZuJwYWQCag4Ft5Zy/A3NZ0/a4ohPbWFF4iX9LnAqSKgMDPv3R3VokW04bFm5uDhXF0lJDOWb8aJuFl56SP2lnbWyP8P8d+3MaFCcuw3F23CS/0ZO5w7CsPsHkvWkmykCB6z/Ju/kqvXK5qYKjAVkZ80LMDNppjN5zZhFZs721zuuMmpFevcfG5c43KujcR/yDfB+t3yfWmaWi21KDapdHXk5lQoxsg6OZe6Wuj7jQq+Zol+ElxD+gn7z2LWXq8a3wyyvGSoKyBfHBjrwzEuUEFbvn5iatPJVX davidtomaschik@davidtomaschik-glaptop2
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXvqt73q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YjtqmmAytqsp5kLVkb82fJSkdj1DuHblgZr4aX9r04bVV1ju19CN57VyhbZtf+fBqQQW1lnjMYm9Kjn matir_pvj
|
||||
@@ -6,6 +6,7 @@ fonts-inconsolata
|
||||
fonts-powerline
|
||||
gimp
|
||||
keepassx
|
||||
meld
|
||||
network-manager-openvpn-gnome
|
||||
solaar
|
||||
vim-gtk
|
||||
|
||||
@@ -4,6 +4,7 @@ cryptsetup
|
||||
dsniff
|
||||
ecryptfs-utils
|
||||
exuberant-ctags
|
||||
httpie
|
||||
iftop
|
||||
iptraf
|
||||
ipython
|
||||
@@ -34,10 +35,12 @@ python3-scapy
|
||||
python3-pip
|
||||
python3-virtualenv
|
||||
radare2
|
||||
ripgrep
|
||||
scapy
|
||||
scdaemon
|
||||
socat
|
||||
source-highlight
|
||||
sqlite3
|
||||
ufw
|
||||
ugrep
|
||||
vim-youcompleteme
|
||||
zsh-syntax-highlighting
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user