Skip to content

Instantly share code, notes, and snippets.

View sethwebster's full-sized avatar

Seth Webster sethwebster

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Amazon.S3.Transfer;
using System.Collections.Specialized;
using System.Configuration;
using Amazon.S3.Model;
using System.IO;
using Amazon.S3.Util;
@sethwebster
sethwebster / gist:1707024
Created January 30, 2012 21:53
S3 Upload Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Amazon.S3.Transfer;
using System.Collections.Specialized;
using System.Configuration;
using Amazon.S3.Model;
using System.IO;
using Amazon.S3.Util;
@sethwebster
sethwebster / GoDaddySSLHAProxy.md
Created December 29, 2015 21:29
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

@sethwebster
sethwebster / README.md
Last active April 12, 2023 19:06
Make Docker Cache Gem Installs to speed up Bundle Install

Gem Install Dockerfile Hack

If you're hacking on your Gemfile and using Docker, you know the pain of having the bundle install command run after you've added or removed a gem. Using docker-compose you could mount a volume and stage your gems there, but this adds additional complexity and doesn't always really solve the problem.

Enter this imperfect solution:

What if we installed every gem into it's own Docker layer which would be happily cached for us?

gem-inject-docker does just that. It takes the list of gems used by your app via bundle list and transforms it into a list of RUN gem install <your gem> -v <gem version> statements and injects them into the Dockerfile at a point of your choosing.