Skip to content

Instantly share code, notes, and snippets.

View adegoodyer's full-sized avatar

Adrian Goodyer adegoodyer

View GitHub Profile
@roib20
roib20 / apt-repo-playbook.yaml
Last active May 1, 2024 16:45
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@mrchristine
mrchristine / decode_aws_error.sh
Created December 5, 2019 15:33
Decode and pretty print an encoded error message from AWS
#!/bin/bash
# grab decoded error message
error=`aws sts decode-authorization-message --encoded-message $@ | jq .DecodedMessage`
# trim the start and end double quotes
json_err=${error:1: -1}
# remove escaped quoted strings and pretty print with jq
echo $json_err | sed 's|\\"|"|g' | jq .
@mihow
mihow / load_dotenv.sh
Last active April 28, 2024 03:02
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 25, 2024 13:54
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@flbuddymooreiv
flbuddymooreiv / passgitgpg.md
Last active April 15, 2024 00:08
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.