Skip to content

Instantly share code, notes, and snippets.

@shallowbit
shallowbit / wishlist.txt
Last active April 1, 2024 13:02
Destiny 2 Wishlist Season 22
dimwishlist:item=2779821308&perks=4090651448,106909392,247725512,555281244
dimwishlist:item=2779821308&perks=839105230,106909392,1428297954,4104185692
dimwishlist:item=105164264&perks=3666208348,269888150,1685431615,3913600130,2509860981
unmapAll
map ? showHelp
map <a-/> enterInsertMode?
# map <a-/> openUrl \
url="vimium://status/toggle-disabled/^%20<a-/>"
map <a-?> enterInsertMode key="<a-?>"
# map <c-b:i> editText run="replace,_$s%20%s_"
map <a-t> createTab
run <a-c> c
run <a-v> v
#!/usr/bin/env bash
set -e
trap ctrl_c INT
ctrl_c() {
printf "\n"
echo "Received kill signal, stopping ngrok... "
$(killall ngrok &>/dev/null);
NPIPERELAY_URL="https://github.com/NZSmartie/npiperelay/releases/download/v0.1/npiperelay.exe"
if [ -n "$WSL_DISTRO_NAME" ]; then
APPDATA="$(wslvar appdata)"
APPDATA="${APPDATA//\\/\/}"
NPIPERELAY_WIN="$APPDATA/wsl2-ssh-gpg-npiperelay.exe"
NPIPERELAY="$(wslpath "$NPIPERELAY_WIN")"
if [ ! -f "$NPIPERELAY" ]; then
curl -L -q -o "$NPIPERELAY" "$NPIPERELAY_URL"
function _tmux_update_env {
# tmux must be running
[ "$TMUX" ] || return
# update current shell to parent tmux shell (useful for new SSH connections, x forwarding, etc)
eval $(tmux show-environment -s | grep 'DISPLAY\|SSH_CONNECTION\|SSH_AUTH_SOCK')
}
function preexec() {
_tmux_update_env
function gssh {
echo "Preparing host for forwarded GPG agent..." >&2
# prepare remote for agent forwarding, get socket
# Remove the socket in this pre-command as an alternative to requiring
# StreamLocalBindUnlink to be set on the remote SSH server.
# Find the path of the agent socket remotely to avoid manual configuration
# client side. The location of the socket varies per version of GPG,
# username, and host OS.
remote_socket=$(cat <<'EOF' | command ssh -T "$@" bash
function _update_agents {
# take over SSH keychain (with gpg-agent soon) but only on local machine, not remote ssh machine
# keychain used in a non-invasive way where it's up to you to add your keys to the agent.
if [ ! "$SSH_CONNECTION" ] && which gpg-connect-agent &>/dev/null; then
export SSH_AUTH_SOCK=$(gpgconf --list-dirs | grep agent-ssh-socket | cut -f 2 -d :)
# start GPG agent, and update TTY. For the former only, omit updatestartuptty
# ssh-agent protocol can't tell gpg-agent/pinentry what tty to use, so tell it
# if GPG agent has locked up or there is a stale remote agent, remove
# the stale socket and possible local agent.
if ! timeout -k 2 1 gpg-connect-agent updatestartuptty /bye > /dev/null; then
@shallowbit
shallowbit / settings.json
Last active September 11, 2021 08:29
window-terminal-settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
// Launch Settings
"initialCols": 120,
"initialRows": 60,
"launchMode": "default",
"alwaysOnTop": false,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// Selection
"copyOnSelect": true,
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 60,
"requestedTheme" : "system",
"showTabsInTitlebar" : true,
"showTerminalTitleInTitlebar" : true,
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 60,
"requestedTheme" : "system",
"showTabsInTitlebar" : true,
"showTerminalTitleInTitlebar" : true,