Skip to content

Instantly share code, notes, and snippets.

View mick's full-sized avatar

Mick Thompson mick

View GitHub Profile
@omo
omo / Dockerfile
Created February 1, 2021 05:26
oauth2-proxy on Cloud Run
FROM alpine:3.13
WORKDIR /opt/draft-proxy
RUN apk update && apk add git curl
RUN curl -L -o package.tgz https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v6.1.1/oauth2-proxy-v6.1.1.linux-amd64.tar.gz && \
tar xvzf package.tgz && \
mv oauth2-proxy-*.linux-amd64/oauth2-proxy .
CMD ["./oauth2-proxy", \
"--provider=github", "--github-org=YOUR_GITHUB_ORG", "--email-domain=*", \
"--http-address=0.0.0.0:8080", \
"--reverse-proxy=true", \
@ppatierno
ppatierno / scala_to_json.scala
Last active February 17, 2021 17:23
Creating JSON with simple values and collections in Scala
package org.ppatierno
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.{ArrayNode, ObjectNode}
import com.fasterxml.jackson.module.scala.DefaultScalaModule
/**
* Created by ppatiern on 02/08/16.
*/
object JsonTest {
@msmith
msmith / couchdb-ec2-install.sh
Created August 25, 2011 17:26
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@defunkt
defunkt / browser
Created March 1, 2010 10:01
pipe html to a browser
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then