requirements:
PyYAML==3.13
deepdiff==3.3.0
jsonpickle==1.0
| -- Global workspaces: undo Omarchy 4.5's per-monitor workspaces. | |
| -- Super+N goes to workspace N, on whichever monitor it lives; an unassigned N opens on the focused monitor. | |
| -- Stop the per-monitor manager from renumbering workspaces on reload and hotplug. | |
| o.workspaces.reconcile = function() end | |
| for n = 1, 10 do | |
| local key = "code:" .. tostring(n + 9) | |
| local ws = tostring(n) |
| #!/usr/bin/env python3 | |
| import argparse | |
| import difflib | |
| import sys | |
| from collections import defaultdict | |
| from typing import Dict, List | |
| import yaml |
| #!/bin/bash | |
| #fix ssh-agent when attaching to a tmux session | |
| fixssh() { | |
| eval $(tmux show-env \ | |
| |sed -n 's/^\(SSH_[^=]*\)=\(.*\)/export \1="\2"/p') | |
| } |
| function worktree_add() { | |
| ## Run this function in the top level directory of a git repo | |
| ## to create a worktree directory from a new or existing branch | |
| if [ -d ./.git ]; then | |
| git rev-parse --verify "$1" | |
| if [ $? -eq 0 ]; then | |
| echo "Creating a worktree ../$1 from existing branch $1" | |
| git worktree add "../$1" "$1" | |
| else | |
| echo "Creating a worktree ../$1 from a new branch $1" |
| #!/bin/bash | |
| #Vault password is 1 | |
| echo "Converting vault to yaml format:" | |
| ansible-vault decrypt --output - vault | python ./convert_vault.py > new-vault.yml | |
| echo "Decrypting a variable from the converted vault" | |
| ansible localhost -i localhost, -e @new-vault.yml -m debug -a 'var=secret' --ask-vault-pas |
| - hosts: localhost | |
| connection: local | |
| gather_facts: false | |
| vars: | |
| region: us-east-1 | |
| version: 1.0 | |
| repository: ansible-deploy-test | |
| server_type: todo | |
| subnet_id: subnet-f7e20b80 |
| #!/usr/bin/env python | |
| import argh, os, sys | |
| from docker import Client | |
| from os.path import dirname, basename | |
| def get_containers(cli): | |
| container_ids = [ c['Id'] for c in cli.containers() ] | |
| containers = [ cli.inspect_container(cid) for cid in container_ids ] |
| #!/usr/bin/env python | |
| # Reads fdupes(-r -1) output and create relative symbolic links for each duplicate | |
| # usage: fdupes -r1 . | ./lndupes.py | |
| import os | |
| from os.path import dirname, relpath, basename, join | |
| import sys | |
| lines = sys.stdin.readlines() |