Skip to content

Instantly share code, notes, and snippets.

@bkrodgers
bkrodgers / export-slack-emoji.sh
Last active August 16, 2016 19:13
Prompts for a slack API token and exports all emoji from the associated instance to ./output. Get your token here: https://api.slack.com/docs/oauth-test-tokens. Use https://chrome.google.com/webstore/detail/slack-emoji-tools/anchoacphlfbdomdlomnbbfhcmcdmjej to import
#!/bin/bash
token=""
while [[ -z "$token" ]]; do
read -s -p "Please enter your Slack token: " token
done
echo ""
mkdir -p output
list=$(curl https://slack.com/api/emoji.list?token=$token)
for key in $(echo $list | jq --raw-output '.emoji | keys | .[]'); do

Keybase proof

I hereby claim:

  • I am bkrodgers on github.
  • I am bkrodgers (https://keybase.io/bkrodgers) on keybase.
  • I have a public key whose fingerprint is 036A 0DD1 0287 24B3 4360 FFE5 7B73 D517 1EDD DB1A

To claim this, I am signing this object:

@bkrodgers
bkrodgers / gist:9c33349ec04dbe3c4263
Created February 16, 2016 00:24
Export data from etcd into a runnable script
for path in $(etcdctl ls -p --recursive) ; do
case "$path" in
*/)
echo "etcdctl setdir '$path'" >> etcd-dump.sh
;;
*)
val=$(etcdctl get $path)
echo "etcdctl set '$path' '$val'" >> etcd-dump.sh
;;
esac
@bkrodgers
bkrodgers / gist:3dd8423c8b145f4ebbe0
Created June 18, 2015 21:50
Vault config for docker, with TLS path, consul via the docker bridge
backend "consul" {
address = "172.17.42.1:8500"
path = "vault"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_cert_file = "/vault/vault.crt"
tls_key_file = "/vault/vault.key"
}