78 Commits

Author SHA1 Message Date
David Tomaschik
503bba6516 Add msitools. 2018-10-11 11:31:21 -05:00
David Tomaschik
d84ee23039 Merge branch 'master' of https://github.com./Matir/skel 2018-09-10 16:04:17 -07:00
David Tomaschik
ea1d3f669b Rework overrides for ssh config. 2018-09-10 16:04:15 -07:00
David Tomaschik
47b4248de2 Git ignore kicad-bak files. 2018-09-01 12:49:52 -07:00
David Tomaschik
33e9188612 Add apktool to install_tool. 2018-09-01 12:49:36 -07:00
David Tomaschik
2f6c9c8c0a No special highlighting for root. 2018-09-01 12:49:18 -07:00
David Tomaschik
7128789d48 Merge branch 'master' of https://github.com./Matir/skel 2018-08-18 16:15:10 -07:00
David Tomaschik
19068da3f8 Fix _install_apt_proxy.sh 2018-08-18 16:15:00 -07:00
David Tomaschik
10851db1a9 Improve package installation. 2018-08-03 22:37:06 -07:00
David Tomaschik
1b8d6b85db Merge branch 'master' of https://github.com./Matir/skel 2018-08-02 16:51:49 -07:00
David Tomaschik
653fa39cf7 Remove cursorline from vimrc.
It makes things very slow when enabled on complex files.
See this github issue for context:

https://github.com/vim/vim/issues/2584
2018-08-02 16:51:17 -07:00
David Tomaschik
7b0713675c Add psmisc to packages.cli. 2018-08-01 20:32:53 -07:00
David Tomaschik
52ed3913c8 Symlinks in tools. 2018-07-30 20:20:56 -07:00
David Tomaschik
6d23e72bd7 Set default key for GnuPG. 2018-07-29 19:49:10 -07:00
David Tomaschik
da545f0de7 Support restoring dconf. 2018-07-08 13:56:37 -07:00
David Tomaschik
8d9cf14608 Add a minimal inputrc. 2018-07-06 15:52:20 +02:00
David Tomaschik
bdc1551122 Prevent hiding cursor when moving with arrows. 2018-07-05 14:35:49 +02:00
David Tomaschik
ba497cd5bf Enable syntax highlighting in zsh. 2018-07-04 11:12:37 +02:00
David Tomaschik
ca63946c5e Merge remote-tracking branch 'gh/master' 2018-06-25 20:47:36 +02:00
David Tomaschik
0b6fa6b0fa Install dex with i3. 2018-06-25 20:46:10 +02:00
David Tomaschik
12247790a6 Use dex for desktop files. 2018-06-25 20:45:34 +02:00
David Tomaschik
4d245198a8 Add SSH canonicalization settings. 2018-06-25 20:45:14 +02:00
David Tomaschik
8f4e4fe77b I don't like noglob scp. 2018-06-18 09:25:48 -07:00
David Tomaschik
1cafe1cf7a Don't always send a fake user agent. 2018-06-13 14:26:44 -07:00
David Tomaschik
ba546d478e Add tmux copy/pasta. 2018-06-11 21:55:00 -07:00
David Tomaschik
08d9567bdf Update zsh. 2018-06-11 21:29:50 -07:00
David Tomaschik
a460ee3bb4 More convenience keybindings. 2018-06-10 12:57:38 -07:00
David Tomaschik
f005bae9e6 Move SSH config to include-based. 2018-06-02 21:18:26 -07:00
David Tomaschik
3279d52505 Change locale detection. 2018-05-25 21:03:08 -07:00
David Tomaschik
939c604381 Fix env syntax. 2018-05-24 20:09:45 -07:00
David Tomaschik
d2061e29ef Make .env POSIX compliant. 2018-05-20 21:41:24 -07:00
David Tomaschik
de62342054 Merge branch 'master' of https://github.com/Matir/skel 2018-05-20 21:39:24 -07:00
David Tomaschik
2cf2aa4e78 Merge branch 'master' of https://github.com./Matir/skel 2018-05-16 17:05:55 -07:00
David Tomaschik
672767d758 Add PICKit3 udev rules. 2018-05-16 17:05:06 -07:00
David Tomaschik
96c2c37eb8 Merge branch 'master' of https://github.com./Matir/skel 2018-05-12 15:57:30 -07:00
David Tomaschik
ffb5d753cd Always try sudo if needed. 2018-05-12 15:57:23 -07:00
David Tomaschik
7a7340ef1d Add chromebook key. 2018-05-12 15:57:23 -07:00
David Tomaschik
b1bea45a48 Update skel to handle minimal environments. 2018-05-12 15:57:23 -07:00
David Tomaschik
01432d1f41 Roll back removing titles for groupings. 2018-05-12 15:57:17 -07:00
David Tomaschik
d6800370de Always try sudo if needed. 2018-05-12 12:50:16 -07:00
David Tomaschik
8f547abf93 Add chromebook key. 2018-05-12 12:45:25 -07:00
David Tomaschik
a02825fb1f Update skel to handle minimal environments. 2018-05-07 22:25:17 -07:00
David Tomaschik
5e3d133f8b Switch to vim keybindings. 2018-05-02 22:13:42 -07:00
David Tomaschik
48477290f0 Fix zshrc compinstall path 2018-05-02 14:43:34 -07:00
David Tomaschik
6bf68dfb2e Merge branch 'master' of https://github.com./Matir/skel 2018-04-23 22:12:14 -07:00
David Tomaschik
590a1a2fa0 Script to setup APT proxy. 2018-04-23 22:12:05 -07:00
David Tomaschik
697db6ca24 Merge branch 'master' of https://github.com./Matir/skel 2018-04-18 16:08:35 -07:00
David Tomaschik
f028c2f320 Fix SSH to github when ndots=2. 2018-04-18 16:07:50 -07:00
David Tomaschik
32a1c18c5d Add compose key. 2018-04-18 16:07:34 -07:00
David Tomaschik
4ec3fa1e22 Fix tab completion of usernames. 2018-04-18 16:07:15 -07:00
David Tomaschik
26685dfadb Add jekyll dev command. 2018-04-16 11:59:39 -07:00
David Tomaschik
0b327577e7 Fixing completion. 2018-04-15 17:45:02 -07:00
David Tomaschik
373f6c31c6 Merge branch 'master' of https://github.com./Matir/skel 2018-04-15 09:10:27 -07:00
David Tomaschik
4f7d98930d More improvements in slugs. 2018-04-11 16:09:29 +02:00
David Tomaschik
1aa256252f Note untracked files. 2018-04-07 20:05:47 +02:00
David Tomaschik
5705cb59c8 Use $EDITOR for editing. 2018-04-07 14:46:27 +02:00
David Tomaschik
c8b33e39c7 Avoid leading and trailing dashes in blog post slugs. 2018-04-07 13:58:02 +02:00
David Tomaschik
a9012bebea Add docker tab completion. 2018-04-07 12:26:54 +02:00
David Tomaschik
6100557a2b Add nasm to packages.cli. 2018-03-22 14:11:23 -07:00
David Tomaschik
5709d8fbb0 Setup locale in .env. 2018-03-18 17:55:27 -07:00
David Tomaschik
5dc84926be Add zlogin to build zcompdump.zwc. 2018-03-18 15:52:15 -07:00
David Tomaschik
b303c1b5c5 virtualenv info in prompt 2018-03-17 21:34:38 -07:00
David Tomaschik
dfd2b48b94 Merge branch 'master' of https://github.com./Matir/skel 2018-03-17 21:24:25 -07:00
David Tomaschik
0e1370a93f Initialize virtualenv. 2018-03-17 21:24:20 -07:00
David Tomaschik
4ebf519af7 Add Zeal documentation browser. 2018-03-17 21:03:45 -07:00
David Tomaschik
1386dc49d0 Rename installed-prefs to .installed-prefs. 2018-03-17 16:59:37 -07:00
David Tomaschik
360aa1c8ec Update zpretorc. 2018-03-16 22:45:02 -07:00
David Tomaschik
8e8d220539 Update rsync_ignore. 2018-03-16 21:03:24 -07:00
David Tomaschik
9b7561ce8f Merge branch 'master' of https://github.com./Matir/skel 2018-03-16 21:03:02 -07:00
David Tomaschik
c9c65e10d7 Install latest mitmproxy. 2018-03-14 22:15:52 -07:00
David Tomaschik
61b4dbe963 Do cyberchef install_tool style. 2018-03-14 13:44:40 -07:00
David Tomaschik
20a8db806c Make HISTFILE zprezto compatible. 2018-03-13 11:26:25 -07:00
David Tomaschik
be1bca8dbe Fix up prompt for vicmd mode. 2018-03-11 17:15:45 -07:00
David Tomaschik
9c3ad64036 Fix up GREP_COLORS. 2018-03-11 16:21:43 -07:00
David Tomaschik
d392eb8dfc Optimize backup. 2018-03-11 16:21:32 -07:00
David Tomaschik
6f15f7096a Fix prompt for git. 2018-03-11 12:44:41 -07:00
David Tomaschik
c7e40f1321 Fix rvm changes. 2018-03-10 23:14:16 -08:00
David Tomaschik
376fbb9f73 Merge branch 'prezto' 2018-03-10 23:13:03 -08:00
35 changed files with 3345 additions and 467 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
installed-prefs installed-prefs
.installed-prefs
*.swp *.swp
*~ *~
*.bak *.bak

35
bin/_install_apt_proxy.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -o errexit
set -o nounset
if test -f /etc/apt/apt.conf.d/90-proxy ; then
echo "Looks already setup."
exit 0
fi
cat >/etc/apt/proxy-detect <<'EOF'
#!/bin/bash
PROXY=192.168.60.10:3142
if ! test -x /bin/nc ; then
echo DIRECT
exit 0
fi
if nc -w 2 -z ${PROXY/:/ } ; then
echo ${PROXY}
exit 0
fi
echo DIRECT
EOF
chmod 755 /etc/apt/proxy-detect
cat >/etc/apt/apt.conf.d/90-proxy <<'EOF'
Acquire::http::Proxy-Auto-Detect "/etc/apt/proxy-detect";
EOF
echo "Setup APT Proxying."

View File

@@ -2,4 +2,4 @@
apt-get install -y \ apt-get install -y \
i3 i3lock xss-lock rxvt-unicode-256color fonts-inconsolata scrot \ i3 i3lock xss-lock rxvt-unicode-256color fonts-inconsolata scrot \
xautolock xbacklight i3status xautolock xbacklight i3status dex

View File

@@ -26,5 +26,5 @@ function verify_dest {
verify_dest "$DEST" verify_dest "$DEST"
rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \ exec nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
--delete-excluded "${HOME}/" "$DEST" --delete-excluded "${HOME}/" "$DEST"

View File

@@ -1,3 +1,11 @@
#!/bin/bash #!/bin/bash
exec xdg-open $(dirname $0)/cyberchef.html set -u
CHEF_FILE=${HOME}/tools/cyberchef/cyberchef.html
if [ ! -f ${CHEF_FILE} ] ; then
${HOME}/bin/install_tool cyberchef
fi
exec xdg-open ${CHEF_FILE}

File diff suppressed because one or more lines are too long

View File

@@ -31,10 +31,16 @@ if [ $# -ne 1 ] ; then
fi fi
TOOL=${1} TOOL=${1}
function die {
echo $* >/dev/stderr
return 1
}
function install_pkgs { function install_pkgs {
if [ ${PACKAGES} -eq 0 ] ; then if [ ${PACKAGES} -eq 0 ] ; then
return 0 return 0
fi fi
# TODO: check if packages are already installed
if [ `id -u` -ne "0" ] ; then if [ `id -u` -ne "0" ] ; then
sudo apt-get -y install $* || ( sudo apt-get -y install $* || (
echo -n "Unable to install packages, please ensure these " >/dev/stderr echo -n "Unable to install packages, please ensure these " >/dev/stderr
@@ -50,6 +56,7 @@ function download {
SRC=${1} SRC=${1}
DST=${2} DST=${2}
echo -n "Downloading ${SRC} to ${DST}..." >&2 echo -n "Downloading ${SRC} to ${DST}..." >&2
# TODO: consider curl instead?
wget --no-server-response -q -O ${DST} --content-disposition ${SRC} wget --no-server-response -q -O ${DST} --content-disposition ${SRC}
echo " done." >&2 echo " done." >&2
} }
@@ -58,6 +65,15 @@ function check_sudo {
sudo -l >/dev/null sudo -l >/dev/null
} }
function add_bin_symlink {
local TARGET NAME BINDIR
TARGET=${1}
NAME=${2:-$(basename ${1})}
BINDIR=${HOME}/bin/tools/
mkdir -p -- ${BINDIR}
ln -sf ${DESTDIR}/${TARGET} ${BINDIR}/${NAME}
}
DESTDIR="${HOME}/tools/${TOOL}" DESTDIR="${HOME}/tools/${TOOL}"
if [ -d ${DESTDIR} ] ; then if [ -d ${DESTDIR} ] ; then
@@ -106,10 +122,11 @@ case ${TOOL} in
gtemp=`mktemp -d` gtemp=`mktemp -d`
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/" gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
# TODO: find a way to make this version independent # TODO: find a way to make this version independent
gsdk="google-cloud-sdk-142.0.0-linux-x86_64.tar.gz" gsdk="google-cloud-sdk-209.0.0-linux-x86_64.tar.gz"
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C ${DESTDIR} tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C ${DESTDIR}
rm /tmp/gcloud.tar.gz rm /tmp/gcloud.tar.gz
add_bin_symlink bin/gcloud
;; ;;
android-sdk) android-sdk)
# TODO: find a way to make this version independent # TODO: find a way to make this version independent
@@ -137,12 +154,13 @@ case ${TOOL} in
fi fi
;; ;;
mitmproxy) mitmproxy)
# Find a better way to get the latest ver=$(python -c 'import urllib2; import json; print(json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["name"].replace("v",""))')
src="https://github.com/mitmproxy/mitmproxy/releases/download/v2.0.1/mitmproxy-2.0.1-linux.tar.gz" download https://snapshots.mitmproxy.org/${ver}/mitmproxy-${ver}-linux.tar.gz /tmp/mitmproxy.tar.gz
download ${src} /tmp/mitmproxy.tar.gz
mkdir -p ${DESTDIR} mkdir -p ${DESTDIR}
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
rm /tmp/mitmproxy.tar.gz rm /tmp/mitmproxy.tar.gz
add_bin_symlink mitmproxy
add_bin_symlink mitmweb
;; ;;
esp) esp)
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz" src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
@@ -176,6 +194,22 @@ case ${TOOL} in
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules && /etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
udevadm control --reload-rules" udevadm control --reload-rules"
;; ;;
cyberchef)
mkdir -p ${DESTDIR}
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"]=="cyberchef.htm", json.load(urllib2.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"])[0]["browser_download_url"])')
download ${src} ${DESTDIR}/cyberchef.html
;;
apktool)
mkdir -p ${DESTDIR}
download \
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
${DESTDIR}/apktool
download \
https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar \
${DESTDIR}/apktool.jar
chmod +x ${DESTDIR}/apktool
add_bin_symlink apktool
;;
*) *)
echo "Unknown tool: ${TOOL}" >/dev/stderr echo "Unknown tool: ${TOOL}" >/dev/stderr
exit 1 exit 1

View File

@@ -0,0 +1,24 @@
[media-keys]
screensaver=['<Primary><Alt>l', 'XF86ScreenSaver']
[wm]
move-to-workspace-1=['<Shift><Super>exclam']
move-to-workspace-2=['<Shift><Super>at']
move-to-workspace-3=['<Shift><Super>numbersign']
move-to-workspace-4=['<Shift><Super>dollar']
move-to-workspace-5=['<Shift><Super>percent']
move-to-workspace-6=['<Shift><Super>asciicircum']
move-to-workspace-7=['<Shift><Super>ampersand']
move-to-workspace-8=['<Shift><Super>asterisk']
move-to-workspace-9=['<Shift><Super>parenleft']
switch-to-workspace-4=['<Super>4']
switch-to-workspace-1=['<Super>1']
switch-to-workspace-10=['<Super>0']
switch-to-workspace-3=['<Super>3']
switch-to-workspace-8=['<Super>8']
switch-to-workspace-5=['<Super>5']
move-to-workspace-10=['<Shift><Super>parenright']
switch-to-workspace-2=['<Super>2']
switch-to-workspace-9=['<Super>9']
switch-to-workspace-6=['<Super>6']
switch-to-workspace-7=['<Super>7']

View File

@@ -3,7 +3,7 @@ Xcursor.size: 16
!!! !!!
! Xft for fonts ! Xft for fonts
!!! !!!
Xft.dpi: 96 !Xft.dpi: 144
Xft.antialias: false Xft.antialias: false
Xft.lcdfilter: lcddefault Xft.lcdfilter: lcddefault
Xft.rgba: rgb Xft.rgba: rgb

View File

@@ -40,6 +40,3 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
fi fi
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

View File

@@ -177,6 +177,7 @@ exec --no-startup-id gnome-settings-daemon
exec --no-startup-id (sleep 2; nm-applet) & exec --no-startup-id (sleep 2; nm-applet) &
exec --no-startup-id xset r rate 200 20 exec --no-startup-id xset r rate 200 20
exec --no-startup-id ~/bin/autostart.py exec --no-startup-id ~/bin/autostart.py
exec --no-startup-id dex --autostart --environment x-cinnamon
# customize windows # customize windows
for_window [window_role="pop-up"] floating enable for_window [window_role="pop-up"] floating enable

View File

@@ -1,4 +1,3 @@
tlsv1 tlsv1
user-agent = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0 Safari/537.36"
create-dirs create-dirs
referer = ";auto" referer = ";auto"

View File

@@ -15,14 +15,48 @@ export LESS="-MR"
export QUOTING_STYLE="literal" # Coreutils quotes export QUOTING_STYLE="literal" # Coreutils quotes
# Fix gnome-terminal # Fix gnome-terminal
if [[ $TERM == "xterm" && $COLORTERM == "gnome-terminal" ]] ; then if [ "$TERM" = "xterm" -a "$COLORTERM" = "gnome-terminal" ] ; then
export TERM="xterm-256color" export TERM="xterm-256color"
fi fi
# For virtualenvwrapper # For virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# GPG full key id # GPG full key id
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi # Setup locale
if test -x /usr/bin/locale ; then
for l in 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}
export LC_TIME=${l}
export LC_MONETARY=${l}
export LC_MESSAGES=${l}
export LC_PAPER=${l}
export LC_NAME=${l}
export LC_ADDRESS=${l}
export LC_TELEPHONE=${l}
export LC_MEASUREMENT=${l}
export LC_IDENTIFICATION=${l}
break
fi
done
else
export LC_CTYPE=C
export LC_NUMERIC=C
export LC_TIME=C
export LC_MONETARY=C
export LC_MESSAGES=C
export LC_PAPER=C
export LC_NAME=C
export LC_ADDRESS=C
export LC_TELEPHONE=C
export LC_MEASUREMENT=C
export LC_IDENTIFICATION=C
fi
export LC_COLLATE=C
if [ -e $HOME/.localenv ] ; then source $HOME/.localenv ; fi

View File

@@ -17,3 +17,6 @@ Thumbs.db
# Try to avoid accidentally checking in private keys # Try to avoid accidentally checking in private keys
id_rsa id_rsa
id_ecdsa id_ecdsa
# Kicad backup files
*.kicad_pcb-bak

View File

@@ -7,3 +7,4 @@ personal-digest-preferences SHA256
cert-digest-algo SHA256 cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
cipher-algo AES256 cipher-algo AES256
default-key 7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B

4
dotfiles/inputrc Normal file
View File

@@ -0,0 +1,4 @@
set editing-mode vi
set keymap vi
set convert-meta on

View File

@@ -1,7 +1,8 @@
# Always load ENV # Always load ENV
test -f "$HOME/.env" && . "$HOME/.env" test -f "$HOME/.env" && . "$HOME/.env"
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local" # Setup GREP_COLORS
export GREP_COLOR='01;31'
export GREP_COLORS='mt=01;31:mc=01;31:ms=01;31'
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
export PATH="$PATH:$HOME/.rvm/bin"

View File

@@ -10,3 +10,4 @@ Downloads
.sqlite_history .sqlite_history
VirtualBox VMs VirtualBox VMs
Audits Audits
SpiderOak Hive

View File

@@ -1,9 +1,21 @@
# Universal Settings (can't override) # Universal Settings
# Never fall back to protocol 1: it's broken
Protocol 2 Protocol 2
# Permit Local Overrides
Include ~/.ssh/config.d/*
# Enable canonicalization, unless overridden
CanonicalizeHostname yes
CanonicalizeFallbackLocal yes
CanonicalDomains systemoverlord.com
CanonicalizeMaxDots 0
# Defaults (May be Overridden) # Defaults (May be Overridden)
Host * Host *.*
CheckHostIP yes
Match canonical all
CheckHostIP no
ControlMaster auto ControlMaster auto
ControlPath ~/.ssh/master/%r@%h:%p ControlPath ~/.ssh/master/%r@%h:%p
ControlPersist yes ControlPersist yes
@@ -11,9 +23,6 @@ Host *
ForwardX11 no ForwardX11 no
ForwardX11Trusted no ForwardX11Trusted no
ServerAliveInterval 120 ServerAliveInterval 120
CheckHostIP no UpdateHostKeys yes
User david
Host warzone VerifyHostKeyDNS yes
Hostname warzone.shadowcats.club
Port 22
User matir

View File

@@ -57,3 +57,7 @@ bind M \
set -g mouse-select-pane off \;\ set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\ set -g mouse-select-window off \;\
display 'Mouse: OFF' display 'Mouse: OFF'
# tmux X clipboard integration
bind C-c run "tmux show-buffer | xsel -i -b"
bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer"

View File

@@ -51,7 +51,6 @@ imap <S-Tab> <Esc><<A
" Line numbering, ruler " Line numbering, ruler
set number set number
set ruler set ruler
set cursorline
" File options " File options
set encoding=utf-8 set encoding=utf-8

View File

@@ -1,4 +1,4 @@
setxkbmap -option ctrl:nocaps setxkbmap -option ctrl:nocaps -option compose:ralt
test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd & test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd &
test -f "$HOME/.env" && "$HOME/.env" test -f "$HOME/.env" && "$HOME/.env"
test -f "$HOME/.profile" && . "$HOME/.profile" test -f "$HOME/.profile" && . "$HOME/.profile"

8
dotfiles/zlogin Normal file
View File

@@ -0,0 +1,8 @@
# Execute code that does not affect the current session in the background.
{
# Compile the completion dump to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi
} &!

View File

@@ -60,6 +60,7 @@ function jekyll {
local DATE local DATE
local NEWNAME local NEWNAME
local JEKYLL_DIR local JEKYLL_DIR
local EDITOR=${EDITOR:-vim}
JEKYLL_DIR=`_jekyll_locate_dir` JEKYLL_DIR=`_jekyll_locate_dir`
@@ -73,7 +74,12 @@ function jekyll {
JTEMPLATE+="category: Blog\n" JTEMPLATE+="category: Blog\n"
JTEMPLATE+="---\n\n" JTEMPLATE+="---\n\n"
TITLE=${@[2,-1]} TITLE=${@[2,-1]}
SLUG=$(echo -n ${TITLE}|tr A-Z a-z|tr -c -s -- a-z0-9 -) SLUG=$(echo -n ${TITLE} |
tr A-Z a-z | # Everything in lower case
tr -d "'" | # Remove single quotes entirely
tr -c -s -- a-z0-9 - | # Replace non-alphanums with dashes
sed 's/^-*\([^-].*[^-]\)-*$/\1/' # Remove leading and trailing slashes
)
DATE=`date +%Y-%m-%d` DATE=`date +%Y-%m-%d`
case "${1:-help}" in case "${1:-help}" in
@@ -84,6 +90,7 @@ function jekyll {
echo " post Create a new post to publish immediately." echo " post Create a new post to publish immediately."
echo " publish Publish a draft post by name." echo " publish Publish a draft post by name."
echo " edit Edit a post." echo " edit Edit a post."
echo " dev Run local server with drafts and incremental."
;; ;;
draft) draft)
if [ -z "${SLUG}" ] ; then if [ -z "${SLUG}" ] ; then
@@ -93,7 +100,7 @@ function jekyll {
mkdir -p "${JEKYLL_DIR}/_drafts" mkdir -p "${JEKYLL_DIR}/_drafts"
FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md" FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md"
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}" printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
vim "${FILENAME}" '+$' '+startinsert' ${EDITOR} "${FILENAME}" '+$' '+startinsert'
;; ;;
post) post)
if [ -z "${SLUG}" ] ; then if [ -z "${SLUG}" ] ; then
@@ -103,7 +110,7 @@ function jekyll {
FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md" FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md"
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}" printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
_jekyll_set_date "${FILENAME}" "${DATE}" _jekyll_set_date "${FILENAME}" "${DATE}"
vim "${FILENAME}" '+$' '+startinsert' ${EDITOR} "${FILENAME}" '+$' '+startinsert'
;; ;;
publish) publish)
if [ -z "${SLUG}" ] ; then if [ -z "${SLUG}" ] ; then
@@ -131,7 +138,10 @@ function jekyll {
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
return return
fi fi
vim "${FILENAME}" ${EDITOR} "${FILENAME}"
;;
dev)
command jekyll serve -D -I "$@"
;; ;;
*) *)
command jekyll "$@" command jekyll "$@"

View File

@@ -1,3 +1,5 @@
# vim: syntax=zsh
function prompt_matir_setup { function prompt_matir_setup {
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook
autoload -Uz vcs_info autoload -Uz vcs_info
@@ -9,14 +11,31 @@ function prompt_matir_setup {
add-zsh-hook precmd prompt_matir_precmd add-zsh-hook precmd prompt_matir_precmd
# Git related styles
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' formats ' (%b%u)' zstyle ':vcs_info:*' formats ' (%b%u%c)'
zstyle ':vcs_info:*' stagedstr '*' zstyle ':vcs_info:*' stagedstr '*'
zstyle ':vcs_info:*' unstagedstr '*' zstyle ':vcs_info:*' unstagedstr '*'
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
# TODO: add virtualenv/rvm info # Virtualenv formatting
PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[blue]%}${vcs_info_msg_0_}%{$fg[white]%}%#%{$reset_color%} ' zstyle ':prezto:module:python:info:virtualenv' format ' (py:%v)'
PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] ' # History #
PROMPT+='%{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@
PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname
PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path
PROMPT+='%{$fg[magenta]%}${python_info[virtualenv]}' # virtualenv
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol
# Editor options
zstyle ':prezto:module:editor:info:keymap:primary' format ''
zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
zstyle ':prezto:module:editor:info:keymap:alternate' format ' [VICMD]'
zstyle ':prezto:module:editor:info:completing' format '...'
# Rprompt setup # Rprompt setup
local show_return="✘ " local show_return="✘ "
@@ -26,11 +45,25 @@ function prompt_matir_setup {
fi fi
RPROMPT='%(?:: %{$fg[red]%}' RPROMPT='%(?:: %{$fg[red]%}'
RPROMPT+=${show_return} RPROMPT+=${show_return}
RPROMPT+='%{$reset_color)%}' RPROMPT+='%{$reset_color%})'
RPROMPT+='${editor_info[keymap]}'
} }
function prompt_matir_precmd { function prompt_matir_precmd {
vcs_info vcs_info
if (( $+functions[python-info] )); then
python-info
fi
}
### git: Show marker (*) if there are untracked files in repository
# Make sure you have added staged to your 'formats': %c
+vi-git-untracked(){
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \
git status --porcelain | grep '??' &> /dev/null ; then
hook_com[staged]+='*'
fi
} }
prompt_matir_setup "$@" prompt_matir_setup "$@"

File diff suppressed because it is too large Load Diff

View File

@@ -41,6 +41,7 @@ zstyle ':prezto:load' pmodule \
'gpg' \ 'gpg' \
'python' \ 'python' \
'ruby' \ 'ruby' \
'syntax-highlighting' \
'history-substring-search' \ 'history-substring-search' \
'jekyll' \ 'jekyll' \
'prompt' \ 'prompt' \
@@ -56,6 +57,8 @@ zstyle ':prezto:load' pmodule \
# #
# Completions # Completions
# #
# No groups of completions.
zstyle ':completion:*' format ''
# Set the entries to ignore in static */etc/hosts* for host completion. # Set the entries to ignore in static */etc/hosts* for host completion.
# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \ # zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
@@ -145,7 +148,7 @@ zstyle ':prezto:module:prompt' theme 'matir'
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' # zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
# Automatically initialize virtualenvwrapper if pre-requisites are met. # Automatically initialize virtualenvwrapper if pre-requisites are met.
# zstyle ':prezto:module:python:virtualenv' initialize 'yes' zstyle ':prezto:module:python:virtualenv' initialize 'yes'
# #
# Screen # Screen
@@ -170,14 +173,12 @@ zstyle ':prezto:module:prompt' theme 'matir'
# Set syntax highlighters. # Set syntax highlighters.
# By default, only the main highlighter is enabled. # By default, only the main highlighter is enabled.
# zstyle ':prezto:module:syntax-highlighting' highlighters \ zstyle ':prezto:module:syntax-highlighting' highlighters \
# 'main' \ 'main' \
# 'brackets' \ 'brackets' \
# 'pattern' \ 'pattern' \
# 'line' \ 'line'
# 'cursor' \
# 'root'
#
# Set syntax highlighting styles. # Set syntax highlighting styles.
# zstyle ':prezto:module:syntax-highlighting' styles \ # zstyle ':prezto:module:syntax-highlighting' styles \
# 'builtin' 'bg=blue' \ # 'builtin' 'bg=blue' \
@@ -193,16 +194,16 @@ zstyle ':prezto:module:prompt' theme 'matir'
# #
# Auto set the tab and window titles. # Auto set the tab and window titles.
# zstyle ':prezto:module:terminal' auto-title 'yes' zstyle ':prezto:module:terminal' auto-title 'yes'
# Set the window title format. # Set the window title format.
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
# Set the tab title format. # Set the tab title format.
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
# Set the terminal multiplexer title format. # Set the terminal multiplexer title format.
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s' zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
# #
# Tmux # Tmux
@@ -212,7 +213,7 @@ zstyle ':prezto:module:prompt' theme 'matir'
zstyle ':prezto:module:tmux:auto-start' local 'no' zstyle ':prezto:module:tmux:auto-start' local 'no'
# Auto start a session when Zsh is launched in a SSH connection. # Auto start a session when Zsh is launched in a SSH connection.
zstyle ':prezto:module:tmux:auto-start' remote 'yes' zstyle ':prezto:module:tmux:auto-start' remote 'no'
# Integrate with iTerm2. # Integrate with iTerm2.
# zstyle ':prezto:module:tmux:iterm' integrate 'yes' # zstyle ':prezto:module:tmux:iterm' integrate 'yes'

View File

@@ -1,13 +1,13 @@
# For interactive shells # For interactive shells
HISTFILE=~/.histfile HISTFILE=~/.zhistory
HISTSIZE=1000 HISTSIZE=10000
SAVEHIST=1000 SAVEHIST=10000
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases
unsetopt beep histbeep listbeep flowcontrol unsetopt beep histbeep listbeep flowcontrol
bindkey -e bindkey -v
# Completion # Completion
zstyle :compinstall filename '/home/david/.zshrc' zstyle :compinstall filename "${HOME}/.zshrc"
autoload -Uz compinit && compinit autoload -Uz compinit && compinit
DIRSTACKSIZE=16 DIRSTACKSIZE=16
@@ -32,9 +32,14 @@ fi
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi fi
# noglob scp is so annoying
unalias scp
# Overrides to prezto
unsetopt cdablevars
# .profile is universal # .profile is universal
# but after oh-my-zsh to use anything setup there # but after zprezto to use/override anything setup there
. ~/.profile . ~/.profile
# Deduplicate the path # Deduplicate the path
typeset -U path typeset -U path
@@ -43,8 +48,17 @@ typeset -U path
# Keybindings # Keybindings
bindkey '^[[A' history-search-backward bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward bindkey '^[[B' history-search-forward
# ctrl-arrow keys
bindkey '^[[1;5C' forward-word bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word bindkey '^[[1;5D' backward-word
bindkey '^P' up-history
bindkey '^N' down-history
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
# ok, a few convenience bindings
bindkey '^w' backward-kill-word
bindkey '^r' history-incremental-search-backward
# Source extras and aliases if interactive # Source extras and aliases if interactive
if [[ $- == *i* ]] ; then if [[ $- == *i* ]] ; then
@@ -57,6 +71,9 @@ if [ -x /usr/bin/ack-grep ] ; then
alias ack='/usr/bin/ack-grep' alias ack='/usr/bin/ack-grep'
fi fi
# Setup PATH for tools
PATH=${PATH}:${HOME}/bin/tools
# Most is nice, if we have it # Most is nice, if we have it
if command -v most >/dev/null 2>&1; then if command -v most >/dev/null 2>&1; then
export PAGER="most" export PAGER="most"
@@ -64,15 +81,3 @@ fi
# Load any local settings # Load any local settings
if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi
function start_esp {
if [ ! -d ${HOME}/tools/esp ] ; then
echo "ESP not installed!" >/dev/stderr
return 1
fi
export PATH="${PATH}:${HOME}/tools/esp/xtensa-esp32-elf/bin"
export IDF_PATH="${HOME}/tools/esp/esp-idf"
}
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

View File

@@ -221,7 +221,7 @@ run_as_root() {
if [ ${USER} = "root" ] ; then if [ ${USER} = "root" ] ; then
"$@" "$@"
return $? return $?
elif groups | grep -q '\bsudo\b' ; then elif test -x $(which sudo 2>/dev/null) ; then
verbose "Using sudo to run ${1}..." verbose "Using sudo to run ${1}..."
sudo "$@" sudo "$@"
return $? return $?
@@ -232,7 +232,10 @@ run_as_root() {
install_pkg_set() { install_pkg_set() {
local pkg_file=${BASEDIR}/${1} local pkg_file=${BASEDIR}/${1}
local pkg_list="" local pkg_list=""
if [ ! -f "${pkg_file}" ] ; then return 0 ; fi if [ ! -f "${pkg_file}" ] ; then
echo "Package set $(basename ${pkg_file}) does not exist." 1>&2
return 1
fi
while read line ; do while read line ; do
if is_comment "${line}" ; then if is_comment "${line}" ; then
continue continue
@@ -280,7 +283,11 @@ install_chrome() {
read_saved_prefs() { read_saved_prefs() {
# Can't use basedir here as we don't have it yet # Can't use basedir here as we don't have it yet
local pref_file=`dirname $0`/installed-prefs local old_pref_file=`dirname $0`/installed-prefs
local pref_file=`dirname $0`/.installed-prefs
if [ -f ${old_pref_file} -a ! -f ${pref_file} ] ; then
mv ${old_pref_file} ${pref_file}
fi
if [ -f ${pref_file} ] ; then if [ -f ${pref_file} ] ; then
verbose "Loading saved skel preferences from ${pref_file}" verbose "Loading saved skel preferences from ${pref_file}"
# source is a bashism # source is a bashism
@@ -290,7 +297,7 @@ read_saved_prefs() {
save_prefs() { save_prefs() {
test $SAVE = 1 || return 0 test $SAVE = 1 || return 0
local pref_file=${BASEDIR}/installed-prefs local pref_file=${BASEDIR}/.installed-prefs
(echo_pref BASEDIR (echo_pref BASEDIR
echo_pref MINIMAL echo_pref MINIMAL
echo_pref INSTALL_KEYS echo_pref INSTALL_KEYS
@@ -344,6 +351,13 @@ install_main() {
cleanup cleanup
} }
install_dconf() {
which dconf >/dev/null 2>&1 || return 1
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read dcpath ; do
dconf load ${dcpath}/ < "${BASEDIR}/dconf/${dcpath}"
done
}
# Setup variables # Setup variables
read_saved_prefs read_saved_prefs
@@ -384,11 +398,8 @@ case $OPERATION in
install_dotfiles install_dotfiles
;; ;;
package*) package*)
if [ ${2:-default} != default ] ; then PKG_SET=${2:-minimal}
install_pkg_set packages.${2} install_pkg_set packages.${PKG_SET}
else
install_pkg_set packages
fi
;; ;;
pwndbg) pwndbg)
install_pwndbg install_pwndbg
@@ -397,6 +408,10 @@ case $OPERATION in
# Do nothing, just sourcing # Do nothing, just sourcing
set +o errexit set +o errexit
;; ;;
dconf)
# Load dconf
install_dconf
;;
*) *)
echo "Unknown operation $OPERATION." >/dev/stderr echo "Unknown operation $OPERATION." >/dev/stderr
exit 1 exit 1

View File

@@ -0,0 +1 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIsFYLEsalNh/l6PtMZhi0f/eZ22uoMw/xYpgPy6vBU6OlpN2FjW7R0pwX29fZjjVQoF0eEG0K/9/CcYcnxtspw= chronos@localhost

View File

@@ -7,3 +7,4 @@ network-manager-openvpn-gnome
vim-gtk vim-gtk
wireshark wireshark
wkhtmltopdf wkhtmltopdf
zeal

View File

@@ -11,10 +11,13 @@ jq
kpartx kpartx
ldap-utils ldap-utils
lvm2 lvm2
msitools
most most
nasm
opensc opensc
openvpn openvpn
p7zip-full p7zip-full
psmisc
python3 python3
python3-pip python3-pip
python3-virtualenv python3-virtualenv
@@ -22,7 +25,6 @@ python-crypto
python-dev python-dev
python-hachoir-urwid python-hachoir-urwid
python-html5lib python-html5lib
python-imaging
python-nwdiag python-nwdiag
python-pip python-pip
python-scapy python-scapy

Binary file not shown.

Binary file not shown.

2
udev/41-microchip.rules Normal file
View File

@@ -0,0 +1,2 @@
# Pickit 3
ATTR{idVendor}=="04d8", ATTR{idProduct}=="900a", MODE="0666", GROUP="plugdev"