Skip to content

Instantly share code, notes, and snippets.

View tylerpearson's full-sized avatar

Tyler Pearson tylerpearson

View GitHub Profile
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active September 23, 2023 09:38
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@voxxit
voxxit / download-slow-query-log.sh
Last active October 31, 2023 16:13
Downloads RDS slow query logs for the last 24 hours using the AWS CLI
#!/bin/bash
instanceID=$1
date=$(date +%Y%m%d)
function downloadLog () {
local log=$1
aws rds download-db-log-file-portion \
--output text \
@djo
djo / run.sh
Last active January 27, 2020 04:35
Handling of UNIX-signals in Erlang/Elixir is not supported, this script provides start-stop management with handling TERM signal for Docker installation.
#!/usr/bin/env bash
set -x
term_handler() {
echo "Stopping the server process with PID $PID"
erl -noshell -name "term@127.0.0.1" -eval "rpc:call('app@127.0.0.1', init, stop, [])" -s init stop
echo "Stopped"
}
trap 'term_handler' TERM INT
@thomasst
thomasst / migrate-redis.py
Created May 14, 2015 18:26
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@jmoe
jmoe / fastly.rake
Last active August 29, 2015 14:06
Quick rake task to automate setting CORS headers on fastly
namespace :fastly do
desc "set fastly cors headers to fix chrome/firefox font loading issues"
task allow_cors: :environment do
# check for the Cors Allow header
versions = Yajl.load(Excon.get("https://api.fastly.com/service/#{ENV['FASTLY_SERVICE_ID']}/version",
:headers => {'Fastly-Key'=>ENV['FASTLY_API_KEY']}).body)
last_version = versions.last['number']
@FUT
FUT / install-redis.sh
Last active April 19, 2022 11:16
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@koenpunt
koenpunt / chosen-bootstrap.css
Last active March 11, 2023 01:01
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@jonah-williams
jonah-williams / circle.yml
Last active May 29, 2019 14:53
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300