Skip to content

Instantly share code, notes, and snippets.

View anderkonzen's full-sized avatar

Anderson Konzen anderkonzen

View GitHub Profile
@anderkonzen
anderkonzen / simple_s3_upload.ex
Created May 23, 2024 09:10 — forked from plicjo/simple_s3_upload.ex
LiveView Uploads to S3
defmodule SimpleS3Upload do
@moduledoc """
Dependency-free S3 Form Upload using HTTP POST sigv4
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
"""
@doc """
Signs a form upload.
The configuration is a map which must contain the following keys:
* `:region` - The AWS region, such as "us-east-1"
@anderkonzen
anderkonzen / Dockerfile-dev
Created November 14, 2019 00:33
Dockerfile for Rails development
FROM ruby:2.3.8-stretch
# To build this image, use:
# docker build -f Dockerfile-dev -t rails-dev .
#
# To run a console with the current directory mounted
# in the container, use:
# docker run -it --rm -v `pwd`:/app rails-dev bundle exec rails c
#
# To run a shell:
@anderkonzen
anderkonzen / docker-compose.yml
Created March 9, 2018 02:44 — forked from mhowlett/docker-compose.yml
Brings up a kafka cluster using Docker for Mac. Usage: MY_IP=<your ip> docker-compose up
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:3.0.1
ports:
- "22181:22181"
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181
@anderkonzen
anderkonzen / keybase.md
Created August 24, 2016 13:10
keybase.md

Keybase proof

I hereby claim:

  • I am anderkonzen on github.
  • I am anderkonzen (https://keybase.io/anderkonzen) on keybase.
  • I have a public key whose fingerprint is 0769 84BB 8E29 F89D 0A80 CF00 05E8 BB9A CB0B 47D0

To claim this, I am signing this object:

@anderkonzen
anderkonzen / gist:bdb116725cc28e18831f
Last active August 29, 2015 14:22
ruby/rails minitest tips
@anderkonzen
anderkonzen / gist:a5a661cd795b80f73556
Last active August 29, 2015 14:21
Docker snippets
# Stop / remove all containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
# Start a bash on a running container
docker exec -t -i <container_name> bash