Skip to content

Instantly share code, notes, and snippets.

Frank Macreery fancyremarker

Block or report user

Report or block fancyremarker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cloudformation-template.yml
AWSTemplateFormatVersion: '2010-09-09'
Description: |
Template for a CloudFront distribution that serves Secure Headers
Parameters:
Domain:
Type: String
Description: |
CNAME at which CloudFront distribution will be served (e.g., foobar.com)
@fancyremarker
fancyremarker / cleanup-deactivated-slack-users.rb
Created Sep 21, 2017
Clean up deactivated Slack users from shared channels
View cleanup-deactivated-slack-users.rb
require 'json'
BASE_URL = 'https://slack.com/api'
TOKEN = ENV['SLACK_TOKEN']
BACKOFF = 0.2
channels_url = "#{BASE_URL}/conversations.list?token=#{TOKEN}"
channels = JSON.parse(`curl -s '#{channels_url}'`)['channels']
sleep BACKOFF
@fancyremarker
fancyremarker / yubikey-ssh.md
Last active Oct 2, 2019
YubiKey Setup Notes (Draft)
View yubikey-ssh.md

Requirements

This configuration assumes you have:

  • A YubiKey that supports OpenPGP (4, 4 Nano, 4C, or NEO)
  • GPGTools (I couldn't get PIN entry, which is required for interfacing to work with any other GPG's version of pinentry)

Setup

  1. Insert YubiKey into USB port.
@fancyremarker
fancyremarker / keybase.md
Created Dec 4, 2016
Keybase Proof of GitHub Identity
View keybase.md

Keybase proof

I hereby claim:

  • I am fancyremarker on github.
  • I am fancyremarker (https://keybase.io/fancyremarker) on keybase.
  • I have a public key whose fingerprint is B98E 8DFD 8FED 629F 5BA3 BC17 CDE8 5C7F F0C9 12C2

To claim this, I am signing this object:

@fancyremarker
fancyremarker / Dockerfile
Last active Apr 2, 2016
Template repo for deploying MongoDB Cloud Monitoring (MMS) agent on Aptible
View Dockerfile
FROM quay.io/aptible/ubuntu:14.04
WORKDIR /tmp
RUN apt-install curl
RUN curl -OL https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_4.1.0.251-1_amd64.deb && \
dpkg -i mongodb-mms-monitoring-agent_4.1.0.251-1_amd64.deb && \
rm -rf mongodb-mms-monitoring-agent_4.1.0.251-1_amd64.deb
ADD start-monitoring-agent /usr/local/bin/
@fancyremarker
fancyremarker / docker-image-refactor.md
Last active Jan 22, 2016
Notes: Docker image refactoring
View docker-image-refactor.md

State of Images

Database repos

  • Mirrored on Quay and Docker Hub
  • Built on Quay and Docker Hub

Application images (private)

  • Includes: Primetime, BroadwayJoe, Megatron, Dumptruck
@fancyremarker
fancyremarker / db-launch.sh
Created Aug 11, 2015
Example: db-launch script to launch any Aptible standardized database image
View db-launch.sh
db-launch ()
{
container=$(head -c 32 /dev/urandom | md5);
passphrase=${PASSPHRASE:-foobar};
image="${@: -1}";
docker create --name $container $image;
docker run --volumes-from $container -e USERNAME=aptible -e PASSPHRASE=$passphrase -e DB=db $image --initialize;
docker run --volumes-from $container $@
}
@fancyremarker
fancyremarker / cert-wizard.rb
Created Jun 17, 2015
Automatically concatenate any certificate chain in its proper order
View cert-wizard.rb
#!/usr/bin/env ruby
# cert-wizard: Concatenate a certificate chain in its correct order
require 'openssl'
COMMAND = ARGV[0]
CERTIFICATE_FILES = ARGV[1..-1]
@filenames = {}
@fancyremarker
fancyremarker / set-config-from-file.rb
Created Jun 1, 2015
[🐙] Set Aptible config variable from file
View set-config-from-file.rb
require 'aptible/auth'
require 'aptible/api'
HANDLE = 'your-app'
EMAIL = 'you@example.com'
PASSWORD = ''
KEY = 'FOOBAR'
FILE = '/path/to/file'
@fancyremarker
fancyremarker / create-internal-aptible-vhost.rb
Last active Aug 29, 2015
[🐙] Create an internal VHOST on Aptible
View create-internal-aptible-vhost.rb
require 'aptible/auth'
require 'aptible/api'
token = Aptible::Auth::Token.create(
email: EMAIL,
password: PASSWORD
)
app = Aptible::Service.find(APP_ID, token: token)
service = app.services.find { |s| s.process_type == PROCESS_TYPE }
vhost = service.create_vhost!(
You can’t perform that action at this time.