Skip to content

Instantly share code, notes, and snippets.

View keiththomps's full-sized avatar

Keith Thompson keiththomps

View GitHub Profile
@keiththomps
keiththomps / Dockerfile
Last active August 25, 2016 00:31
Script to ensure database is set up and run rails server
FROM ruby:2.3
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists
WORKDIR /usr/src/app
COPY Gemfile* ./
RUN bundle install
@keiththomps
keiththomps / Dockerfile
Last active November 12, 2016 20:00
Dockerfile: Alpine with Bash
FROM alpine:3.4
MAINTAINER Keith Thompson <[email protected]>
RUN apk add bash --update-cache
CMD bash
@keiththomps
keiththomps / Dockerfile
Created February 26, 2017 11:41
These modifications will allow you to restart a container that is using puma as the app server. Create a `script` directory (`mkdir script`), and add the `start` script to it. `start` will need to be made executable (`chmod +x script/start`). The only line in the Dockerfile that should change is the `CMD` line. Rebuild the `app` image.
FROM ruby:2.3.1
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends \
postgresql-client \
nodejs \
&& apt-get -q clean \
&& rm -rf /var/lib/apt/lists
# Pre-install gems with native extensions
@keiththomps
keiththomps / init.vim
Created April 27, 2017 22:19
CoderJourney neovim config
call plug#begin('~/.config/nvim/plugged')
function! DoRemote(arg)
UpdateRemotePlugins
endfunction
Plug 'Shougo/deoplete.nvim', { 'do': function('DoRemote'), 'tag': '*' }
let g:deoplete#enable_at_startup = 1
Plug 'AndrewRadev/splitjoin.vim'
@keiththomps
keiththomps / signal_spec.rb
Created May 5, 2017 14:59
Example signal handling test
require "spec_helper"
class MyClass
def self.run(command)
Signal.trap("TERM") { trap_term }
`#{command}`
end
def self.trap_term
@keiththomps
keiththomps / .vimrc
Created October 31, 2017 14:04
Stripped down vim config
set nocompatible
filetype off
filetype plugin indent on
set ttyfast
set laststatus=2
set encoding=utf-8 " Set default encoding to UTF-8
set autoread " Automatically reread changed files without asking me anything
@keiththomps
keiththomps / .vimrc
Created October 31, 2017 14:04
Stripped down vim config
set nocompatible
filetype off
filetype plugin indent on
set ttyfast
set laststatus=2
set encoding=utf-8 " Set default encoding to UTF-8
set autoread " Automatically reread changed files without asking me anything
@keiththomps
keiththomps / keybase.md
Created June 28, 2018 20:17
keybase.md

Keybase proof

I hereby claim:

  • I am keiththomps on github.
  • I am keiththomps (https://keybase.io/keiththomps) on keybase.
  • I have a public key ASBRytaeLef0vL4omBTJZ0JbcdpcOyQMb_6OD00bu9laEAo

To claim this, I am signing this object:

# Download the latest Ghost Image
resource "docker_image" "image_id" {
name = "${var.image}"
}
# Start the Container
resource "docker_container" "container_id" {
name = "${var.container_name}"
image = "${docker_image.image_id.latest}"
ports {
@keiththomps
keiththomps / post_example.go
Created March 4, 2019 18:59
An example of how to make a POST request using Go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)