Skip to content

Instantly share code, notes, and snippets.

@darovic
darovic / ssh_agent_singleton.bash
Created November 20, 2023 03:42
Cross-session ssh-agent singleton for WSL2
# start ssh agent (call this in your .bashrc after the interactivity check)
# adapted from https://unix.stackexchange.com/a/132117
export SSH_AUTH_SOCK=~/.ssh/ssh-agent.$HOSTNAME.sock
ssh-add -l 2>/dev/null >/dev/null
if [ $? -ge 2 ]; then
ssh-agent -a "$SSH_AUTH_SOCK" &>/dev/null
# handle "unix_listener...Address already in use" error
if [ $? -ne 0 ]; then
rm -f $SSH_AUTH_SOCK &>/dev/null
This file is used to be tracked and identified by https://lrc-maker.github.io
@darovic
darovic / theme.json
Last active January 18, 2025 07:12
My oh-my-posh theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "os",
### Keybase proof
I hereby claim:
* I am darovic on github.
* I am darovic (https://keybase.io/darovic) on keybase.
* I have a public key ASAVNV3_mF8LE1XzBcSTq8Wi9qPSYrRUsMMNEs96ofXBtwo
To claim this, I am signing this object: