50 Commits

Author SHA1 Message Date
David Tomaschik
e02dc0be80 Update nerdfonts 2022-10-21 19:58:12 -07:00
David Tomaschik
6c3dea3721 Rename .env to .shenv.
Requires updating symlinks.

Fixes #13.
2022-10-20 11:04:27 -07:00
David Tomaschik
cb3ba03c49 Load profile in sh emulation mode. 2022-10-20 11:04:27 -07:00
David Tomaschik
d7cc6fd508 Add wfh chromebox key 2022-10-20 11:04:27 -07:00
David Tomaschik
e375d7f472 Merge branch 'main' of github.com:Matir/skel 2022-10-16 20:47:13 -07:00
David Tomaschik
373189f440 Add ffuf aliases 2022-10-16 20:47:00 -07:00
David Tomaschik
a719ca9972 Merge branch 'main' of https://github.com/Matir/skel 2022-10-16 11:55:35 -07:00
David Tomaschik
4937a98ccc Suppress LVM warnings 2022-10-16 11:55:27 -07:00
David Tomaschik
81093ab3d6 Add nerdfonts install script 2022-10-08 22:20:21 -07:00
David Tomaschik
ab85cb5ecf Merge branch 'main' of github.com:Matir/skel 2022-10-04 21:24:04 -07:00
David Tomaschik
cbb580fcdf Fix xfwm4.xml 2022-10-04 21:23:51 -07:00
David Tomaschik
aea9e50141 Bump skel 2022-10-03 19:48:28 -07:00
David Tomaschik
10ce6ff7f6 Rotate glaptop keys 2022-09-15 11:26:39 -07:00
David Tomaschik
cd9bb5d6cc Update cyberchef install_tool 2022-09-15 11:25:34 -07:00
David Tomaschik
5cfbc4e88a add pm3iceman 2022-09-03 18:42:17 -07:00
David Tomaschik
44d981e3c3 Add doctl to install_tool 2022-09-03 15:46:53 -07:00
David Tomaschik
3f509e17c1 Update trusted ssh keys 2022-08-26 22:09:03 -07:00
David Tomaschik
af3365ad8e Merge branch 'main' of https://github.com/Matir/skel 2022-08-26 16:54:46 -07:00
David Tomaschik
6888e8503f xfwm4 2022-08-26 16:54:27 -07:00
David Tomaschik
e52af2d21a Merge branch 'main' of github.com:Matir/skel 2022-08-25 22:29:39 -07:00
David Tomaschik
a5a5c7d5df Add ghidra to install_tool 2022-08-25 22:29:28 -07:00
David Tomaschik
aca274d7df Add rvm.zsh 2022-08-20 12:37:38 -07:00
David Tomaschik
70cdfcdc07 Update FTDI rules 2022-06-11 20:05:04 -07:00
David Tomaschik
9a38b456d7 install_tool: arduino-cli 2022-06-11 19:35:38 -07:00
David Tomaschik
a4196d7bc1 Don't depend on RUBY_VERSION in starship 2022-06-11 11:19:04 -07:00
David Tomaschik
cbcc6e6fb6 zshrc fix 2022-06-11 11:06:56 -07:00
David Tomaschik
f2ca693f7b Starship change glyph for status 2022-06-09 21:43:56 +00:00
David Tomaschik
da43e7533d Allow defaulting to starship 2022-06-09 20:14:51 +00:00
David Tomaschik
9c9c56b030 Add zazu key 2022-05-28 20:30:52 -07:00
David Tomaschik
747bc7becd Updates on arch 2022-05-23 21:56:45 -07:00
David Tomaschik
c3c9714b8d Add kubectx to install_tool. 2022-05-14 09:28:36 -07:00
David Tomaschik
5865f5130f Update starship config. 2022-05-14 00:38:16 -07:00
David Tomaschik
6803ac2ce2 Bump gcloud version 2022-05-14 00:38:01 -07:00
David Tomaschik
c512401acd Add starship.toml 2022-05-13 22:04:27 -07:00
David Tomaschik
dae254e240 Updates 2022-05-13 22:03:06 -07:00
David Tomaschik
2ab9bd3452 Update bsidessf config 2022-05-08 17:23:21 -07:00
David Tomaschik
b68c1e2c65 Update gitignore 2022-05-08 17:23:12 -07:00
David Tomaschik
3c8d8ca5e1 Starship support. 2022-05-08 16:01:23 -07:00
David Tomaschik
f6e6c42b26 kubeconform install_tool 2022-05-05 21:14:35 -07:00
David Tomaschik
7165e7c93f Revert "Add kubeval to install_tool."
This reverts commit dea863ee35.
2022-05-05 21:11:29 -07:00
David Tomaschik
63f401c84b Fix gitconfig 2022-05-05 21:11:09 -07:00
David Tomaschik
dea863ee35 Add kubeval to install_tool. 2022-05-05 18:38:28 -07:00
David Tomaschik
d01a320de7 ropper recipe 2022-05-01 16:40:44 -07:00
David Tomaschik
0564dbbb3d Bump config_bsidessf 2022-04-30 11:33:50 -07:00
David Tomaschik
1efa61a9f4 Add duf to packages.cli 2022-03-19 16:33:27 -07:00
David Tomaschik
77a01d2fda Enable delta line-numbers 2022-03-19 15:55:36 -07:00
David Tomaschik
71711a5cc0 Use delta when available 2022-03-19 15:53:34 -07:00
David Tomaschik
a49474fe60 Add more tools 2022-03-19 15:23:50 -07:00
David Tomaschik
2217cfb47b batcat -> bat alias 2022-03-19 14:21:00 -07:00
David Tomaschik
75b0c5db9e Update tools 2022-03-17 18:23:27 -07:00
29 changed files with 246 additions and 18 deletions

View File

@@ -154,7 +154,7 @@ case ${TOOL} in
makedest_or_die
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
# TODO: find a way to make this version independent
gsdk="google-cloud-sdk-277.0.0-linux-x86_64.tar.gz"
gsdk="google-cloud-sdk-385.0.0-linux-x86_64.tar.gz"
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C "${DESTDIR}"
rm /tmp/gcloud.tar.gz
@@ -229,10 +229,27 @@ case ${TOOL} in
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
udevadm control --reload-rules"
;;
pm3iceman)
install_pkgs git ca-certificates build-essential pkg-config \
libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev \
libbz2-dev libbluetooth-dev libpython3-dev libssl-dev
src="https://github.com/RfidResearchGroup/proxmark3.git"
git clone "${src}" "${DESTDIR}"
cd "${DESTDIR}"
make clean && make -sj2
check_sudo && sudo /bin/sh -c \
"cp -rf ./driver/77-pm3-usb-device-blacklist.rules \
/etc/udev/rules.d/77-pm3-usb-device-blacklist.rules &&
udevadm control --reload-rules"
add_bin_symlink pm3
;;
cyberchef)
makedest
src=$(python3 -c 'from urllib import request; import json; print(filter(lambda x: x["name"]=="cyberchef.htm", json.load(request.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"])[0]["browser_download_url"])')
download "${src}" "${DESTDIR}/cyberchef.html"
cd "${DESTDIR}"
src=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"][0]["browser_download_url"])')
download "${src}" "${DESTDIR}/cyberchef.zip"
unzip -d "${DESTDIR}" "${DESTDIR}/cyberchef.zip"
ln -sf CyberChef*.html "${DESTDIR}/cyberchef.html"
;;
apktool)
makedest_or_die
@@ -285,7 +302,7 @@ case ${TOOL} in
exploitdb)
if test -d "${DESTDIR}" ; then
echo "Already installed, updating instead..." >/dev/stderr
"${DESTDIR}/searchsplit" -u
"${DESTDIR}/searchsploit" -u
else
git clone --depth 1 \
https://github.com/offensive-security/exploitdb.git \
@@ -398,6 +415,83 @@ EOF
tldr)
pip3 install --user tldr
;;
blint)
pip3 install --user blint
;;
dust)
if ! command -v cargo >/dev/null 2>&1 ; then
echo "This needs cargo (for rust)!" >/dev/stderr
exit 1
fi
cargo install du-dust
;;
bottom)
if ! command -v cargo >/dev/null 2>&1 ; then
echo "This needs cargo (for rust)!" >/dev/stderr
exit 1
fi
cargo install bottom
;;
delta)
if !check_sudo ; then
echo "Must be able to run as sudo."
exit 1
fi
dpkg_url=$(curl https://api.github.com/repos/dandavison/delta/releases/latest | \
jq -r '.assets[] | select(.name|test(".*_amd64.deb")) | select(.name|test(".*musl.*")|not) | .browser_download_url')
dpkg_name="/tmp/delta_amd64.deb"
download "${dpkg_url}" "${dpkg_name}"
sudo dpkg -i "${dpkg_name}"
;;
ropper)
install_pkgs python3-z3
pip3 install --user pyvex ropper
;;
kubeconform)
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
;;
kubectx)
git clone https://github.com/ahmetb/kubectx.git "${DESTDIR}"
add_bin_symlink kubectx
add_bin_symlink kubens
COMPDIR="${HOME}/.zshrc.completions"
mkdir -p "${COMPDIR}"
ln -sf "${DESTDIR}/completion/_kubectx.zsh" "${COMPDIR}"
ln -sf "${DESTDIR}/completion/_kubens.zsh" "${COMPDIR}"
;;
starship)
mkdir -p ${DESTDIR}
download \
"https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-musl.tar.gz" \
/tmp/starship.tar.gz
tar -C ${DESTDIR} -zxf /tmp/starship.tar.gz starship
add_bin_symlink starship
;;
arduino-cli)
mkdir -p "${DESTDIR}"
download \
"https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz" \
/tmp/arduino-cli.tar.gz
tar -C "${DESTDIR}" -zxf /tmp/arduino-cli.tar.gz arduino-cli
add_bin_symlink arduino-cli
;;
ghidra)
zip_url=$(curl https://api.github.com/repos/NationalSecurityAgency/ghidra/releases/latest | \
jq -r '.assets[] | select(.name|test(".*.zip")) | .browser_download_url')
download "${zip_url}" /tmp/ghidra.zip
unzip -d "${DESTDIR}" /tmp/ghidra.zip
mv ${DESTDIR}/*/* ${DESTDIR}
add_bin_symlink ghidraRun ghidra
;;
doctl)
# TODO: other architectures
tar_url=$(curl https://api.github.com/repos/digitalocean/doctl/releases/latest | \
jq -r '.assets[] | select(.name|test(".*linux-amd64\\.tar\\.gz")) | .browser_download_url')
download "${tar_url}" /tmp/doctl.tar.gz
mkdir -p "${DESTDIR}"
tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl"
add_bin_symlink doctl
;;
*)
echo "Unknown tool: ${TOOL}" >/dev/stderr
list_tools

26
bin/setup/nerdfonts.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -ue
VER="v2.2.2"
FONTS=(
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/DejaVuSansMono.zip
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraCode.zip
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraMono.zip
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Hack.zip
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Inconsolata.zip
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/OpenDyslexic.zip
)
FPATH=${HOME}/.fonts/nerdfonts
mkdir -p ${FPATH}
cd ${FPATH}
for f in ${FONTS[@]}; do
BN=$(basename $f)
wget -O ${FPATH}/${BN} ${f}
unzip -o -d ${FPATH} ${FPATH}/${BN}
done
fc-cache -v

1
dotfiles/Xkbmap Normal file
View File

@@ -0,0 +1 @@
-option ctrl:nocaps -option compose:ralt

View File

@@ -53,3 +53,6 @@ alias bc="command bc -q"
# Get a decently readable df
alias dfh="df -h -x tmpfs -x devtmpfs"
# Clear the GPG agent
alias clear-gpg-agent="echo RELOADAGENT | gpg-connect-agent"

View File

@@ -1,5 +1,5 @@
# Load env first
if [ -f $HOME/.env ] ; then source $HOME/.env ; fi
if [ -f $HOME/.shenv ] ; then source $HOME/.shenv ; fi
# History settings
HISTCONTROL=ignoredups:ignorespace

View File

@@ -1,7 +1,7 @@
# 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=49
sort_key=46
sort_direction=-1
tree_sort_key=0
tree_sort_direction=1

View File

@@ -0,0 +1,19 @@
"$schema" = 'https://starship.rs/config-schema.json'
[directory]
fish_style_pwd_dir_length = 1
[gcloud]
# This is just too noisy
disabled = true
symbol = "️🇬️ "
[status]
disabled = false
symbol = "⛌"
[username]
show_always = true
[ruby]
detect_variables = []

View File

@@ -2,7 +2,7 @@
<channel name="xfwm4" version="1.0">
<property name="general" type="empty">
<property name="activate_action" type="string" value="bring"/>
<property name="activate_action" type="string" value="switch"/>
<property name="borderless_maximize" type="bool" value="true"/>
<property name="box_move" type="bool" value="false"/>
<property name="box_resize" type="bool" value="false"/>
@@ -77,7 +77,7 @@
<property name="wrap_cycle" type="bool" value="true"/>
<property name="wrap_layout" type="bool" value="true"/>
<property name="wrap_resistance" type="int" value="10"/>
<property name="wrap_windows" type="bool" value="true"/>
<property name="wrap_windows" type="bool" value="false"/>
<property name="wrap_workspaces" type="bool" value="false"/>
<property name="zoom_desktop" type="bool" value="true"/>
<property name="zoom_pointer" type="bool" value="true"/>

View File

@@ -6,6 +6,7 @@
excludesfile = ~/.gitignore
editor = vim
whitespace = trailing-space,space-before-tab
pager = command -v delta >/dev/null 2>&1 && delta || less -eFiJM~ -j3
[color]
diff = auto
@@ -13,6 +14,7 @@
[diff]
tool = vimdiff
colorMoved = default
[difftool]
prompt = false
@@ -41,7 +43,7 @@
user = matir
# Site specific config
[url "https://github.com./"]
[url "https://github.com/"]
insteadOf = "github:"
insteadOf = "github://"
@@ -58,16 +60,29 @@
[credential]
helper = cache --timeout=36000
[receive]
denyCurrentBranch = updateInstead
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
prompt = false
[include]
path = ~/.gitconfig.local
[pull]
rebase = false
[init]
defaultBranch = main
[interactive]
diffFilter = command -v delta >/dev/null 2>&1 && delta || cat
[delta]
navigate = true
line-numbers = true

View File

@@ -17,9 +17,13 @@ Thumbs.db
# Try to avoid accidentally checking in private keys
id_rsa
id_ecdsa
id_ed25519
# Kicad backup files
*.kicad_pcb-bak
# Mypy cache path
.mypy_cache
# These files should basically never be committed
.env

View File

@@ -1,6 +1,6 @@
use-agent
# HKPS requires gnupg-curl for gpg1
keyserver hkps://keys.openpgp.org
keyserver hkps://keyserver.ubuntu.com
keyserver-options auto-key-retrieve no-honor-keyserver-url
auto-key-locate keyserver
personal-digest-preferences SHA256

View File

@@ -4,7 +4,7 @@
# Should only use POSIX constructs.
# Always load ENV
test -f "$HOME/.env" && . "$HOME/.env"
test -f "$HOME/.shenv" && . "$HOME/.shenv"
# Setup GREP_COLORS
export GREP_COLOR='01;31'

View File

@@ -2,19 +2,31 @@
.Genymobile
.Ticket to Ride*
.android*
.ansible
.arduino*
.aws
.bundle
.cache
.cargo
.config/discord
.config/gcloud/logs
.dropbox-dist
.gnupg.bak
.gradle
.histfile
.kube/cache
.local/share/Steam
.local/share/Trash
.local/lib
.m2
.npm
.p2
.rvm*
.rustup
.sliver
.sqlite_history
.thumbnails
.virtualenvs
.wine
.zcompdump
.zcompdump*

View File

@@ -81,5 +81,8 @@ export LC_COLLATE=C
# Opt out of .net telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
# Suppress lvm warnings
export LVM_SUPPRESS_FD_WARNINGS=1
# shellcheck source=/dev/null
test -e "$HOME/.localenv" && . "$HOME/.localenv"

View File

@@ -66,7 +66,8 @@ zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache"
# .profile is universal
. ~/.profile
emulate sh -c '. /etc/profile'
emulate sh -c '. ~/.profile'
# Deduplicate the path
typeset -U path
@@ -105,6 +106,8 @@ if [[ $- == *i* ]] ; then
# Virtualenvwrapper
if test -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ; then
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
elif test -f /usr/bin/virtualenvwrapper_lazy.sh ; then
source /usr/bin/virtualenvwrapper_lazy.sh
fi
if command ls --version >/dev/null 2>&1 ; then
alias ls="$(whence -p ls) --color=auto -C"
@@ -155,4 +158,7 @@ fi
if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi
# Set prompt based on local settings
prompt "${THEME:-matir}"
if test -f "${HOME}/.zprompt" ; then
THEME=${THEME:=$(cat "${HOME}/.zprompt")}
fi
prompt "${THEME:-matir}" >/dev/null 2>&1

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env zsh
# On some systems, bat is batcat
if ! command -v bat >/dev/null 2>&1 ; then
if command -v batcat >/dev/null 2>&1 ; then
alias bat=$(command -v batcat)
fi
fi
# FFUF aliases
if command -v ffuf >/dev/null 2>&1 ; then
if test -d $HOME/tools/seclists ; then
alias ffuf-files="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/raft-large-files.txt"
alias ffuf-dirs="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/raft-large-directories.txt"
alias ffuf-quick="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/quickhits.txt"
fi
fi

View File

@@ -1,3 +1,23 @@
function dumpenv {
tr '\0' '\n' < /proc/${1}/environ
}
if test -x "/sbin/starship" ; then
_STARSHIP_PATH="/sbin/starship"
function starship_prompt {
eval $(/sbin/starship init zsh)
}
elif test -x "${HOME}/tools/starship/starship" ; then
_STARSHIP_PATH="${HOME}/tools/starship/starship"
function starship_prompt {
eval $($HOME/tools/starship/starship init zsh)
}
fi
if test -f ${HOME}/.zprompt ; then
if test "$(cat ${HOME}/.zprompt)" = "starship" ; then
if test -n "${_STARSHIP_PATH:-}" ; then
eval $(${_STARSHIP_PATH} init zsh)
fi
fi
fi
unset _STARSHIP_PATH

1
dotfiles/zshrc.d/rvm.zsh Normal file
View File

@@ -0,0 +1 @@
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

View File

@@ -1,3 +1,3 @@
function duf {
function duh {
du -sk "$@" | sort -n | while read size fname; do for unit in K M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
}

View File

@@ -0,0 +1 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOP0EQthckpi83EoFXtbPnn4Ytd7FYW6Nb3W9ZahqOKhNAqv1owot957ihKHtGKFnYr0Jwgp0TNOdpz6nV9wwCo= david@zazu

View File

@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHPlKI3Mt2Hm4YZ0WNOET7SEoXmAABR+eEZ3hnJnA9AJ davidtomaschik@davidtomaschik-glaptop3

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJSM/GRj76roLHo0KV9SgNGNlFmnsiWpRm9r51XqSsnu davidtomaschik@davidtomaschik-glaptop6

View File

@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICvHatAcnYEJ2BXWGN+MaE40avyghYeEZDgfQD8WcRti david@wfh_chromebook

View File

@@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDi2AoHzzSd/xidvRKS1OE7Pe+aGgyEY1WmWJGJ3POHuaQSbGrp4g1En4QurhXwonPiLBtQ0w6Nbbi/3vrXxSnAkJJKd9LXQtjyXVN68285lRr3DWuWnyokhO3B5aGOb5/4b6Dn8YDRrTRefezjbVavgrTFarZ19PmPmJxH9h+ZPV/hNQ6rZjBjrvGerxpmB6CjgXbIxRdsUcnao3+gyPueBOkyHbfiy7QjQT+SgPjIqT/rza4Q0OqFBTk4D7Y96biE5yY31eNs8H7uvR3PfX0NN5zvP/EqJECPYr/B3vOzAr7B8BsqYbA5UFexrp6gYn+LDzr6jAILhEUp8SsC8UFn davidtomaschik@davidtomaschik-glaptop3

View File

@@ -1 +0,0 @@
../id_ecdsa_chromebook.pub

View File

@@ -0,0 +1 @@
../id_ecdsa_zazu.pub

View File

@@ -1,9 +1,14 @@
bat
binfmt-support
build-essential
cryptsetup
dsniff
duf
ecryptfs-utils
exa
exuberant-ctags
fd-find
fzf
httpie
iftop
iptraf

View File

@@ -1 +1,2 @@
BUS=="usb", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6014", GROUP="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="plugdev"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", GROUP="plugdev"