Skip to content

Instantly share code, notes, and snippets.

View samj's full-sized avatar

Sam Johnston samj

View GitHub Profile
@samj
samj / gist:66a2e8c601d4ada405080a227935cb0a
Created July 15, 2024 14:34
pinentry program for gpg to access a 1password item via its CLI (op)
#!/bin/bash
# Set your vault ID and item ID
ACCOUNT_ID="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
VAULT_ID="abcdefghijklmnopqrstuvwxyz"
ITEM_ID="abcdefghijklmnopqrstuvwxyz"
# Authenticate with 1Password (if not already authenticated)
# Retrieve the passphrase from 1Password
@neverything
neverything / .htaccess
Last active April 2, 2022 07:49
WordPress behind a reverse proxy.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /blog/
RewriteBase /~accountname/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /blog/index.php [L]
RewriteRule . /~accountname/index.php [L]