Skip to content

Instantly share code, notes, and snippets.

View alexbaumhoer's full-sized avatar

Alex Baumhoer alexbaumhoer

View GitHub Profile
@koshatul
koshatul / README.md
Last active April 18, 2024 23:33
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@giannisp
giannisp / gist:b53a76047b07751ed3ade3c1db1d2c51
Created November 18, 2016 05:50
Upgrade PostgreSQL 9.5.5 to 9.6.1 using Homebrew (macOS)
After automatically updating Postgres to 9.6.1 via Homebrew, the pg_ctl start command didn't work.
The error was something like "database files are incompatible with server".
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.1 and latest 9.5.x installed, and keep 9.6.1 as default
brew unlink postgresql
brew install postgresql95
brew unlink postgresql95
brew link postgresql
@k3karthic
k3karthic / truncate_dynamodb.sh
Last active July 12, 2022 18:56
Truncate all keys in a dynamodb table
#!/bin/bash
TABLE_NAME=$1
# Get id list
aws dynamodb scan --table-name $TABLE_NAME | grep ID | awk '{ print $2 }' > /tmp/truncate.list
# Delete from id list
cat /tmp/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname