Skip to content

Instantly share code, notes, and snippets.

@joelparker
joelparker / .tmux.conf
Last active August 28, 2023 23:30
Default ~/.tmux.conf configuration
#https://wiki.archlinux.org/index.php/Tmux#Key_bindings
unbind C-b
set -g prefix C-j
bind C-j last-window
#bind C-j send-prefix
#unbind-key C-n
#unbind-key C-p
#bind-key C-n next-window
@joelparker
joelparker / gist:0429f8c5547c47ad35a4
Last active May 16, 2016 14:37
IAM Group Policy for Arq4 Backup on S3
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1416260474000",
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:GetLifecycleConfiguration",
"s3:ListBucket",

Keybase proof

I hereby claim:

  • I am joelparker on github.
  • I am joelparker (https://keybase.io/joelparker) on keybase.
  • I have a public key whose fingerprint is C236 CED8 25A8 2D83 EFC7 E55F C07A 0310 9DC7 6BC5

To claim this, I am signing this object:

@joelparker
joelparker / delete_glacier_vault.py
Created November 7, 2013 16:05
Python boto script to delete all archives in an AWS Glacier Vault
import boto.glacier
#These should be filled in by you
GLACIER_KEY_ID=None
GLACIER_SECRET_ACCESS_KEY=None
#You can get the vault ARN from the AWS Console or list_vaults()
GLACIER_VAULT_ARN='FILL IN'
#The job ID is retrieved by calling value.retrieve_inventory_job
@joelparker
joelparker / build.sh
Created January 10, 2013 00:37
Send a success or failure push notification from my slow build machine to my phone using Parse.com. When I get a push notification I know to go back to my terminal. The python is pretty much cut and paste from Parse's Rest API tutorial. An example: #Use build.sh instead of make build.sh 2>&1 | tee foo
#!/bin/bash
my_pwd=`pwd`
run_make_from_pwd="(cd ${my_pwd} && make)"
python ~/bin/push_build_status.py "${run_make_from_pwd}"
@joelparker
joelparker / aws_sns_publish_git_commits.py
Last active December 10, 2015 21:39
A little command line utility that uses boto to send email to my micro managing boss for every git command I push to a repo. It's not that he wants all commits but rather a list of every commit I do (that's the same thing to me to....). I created an Amazon SNS Topic with an email subscription. When I publish to the topic an email is sent.
import boto.sns
import git
import argparse
#Default git repo location so you don't have to pass it on the cli using --repo
git_repo_location = "/some/path/on/disk/to/git/repo"
#Log into the AWS SNS console to get this value
#https://console.aws.amazon.com/sns/home and click on the topic you want
topic_arn = u'arn:aws:sns:region:.*:topic_name'