Skip to content

Instantly share code, notes, and snippets.

View bradrydzewski's full-sized avatar

Brad Rydzewski bradrydzewski

View GitHub Profile
@bradrydzewski
bradrydzewski / aws_lambda_shim
Created April 13, 2018 21:00
AWS Lambda Shim
package main
import (
"errors"
"fmt"
"log"
"net/http"
"net/url"
"github.com/aws/aws-lambda-go/events"
@bradrydzewski
bradrydzewski / flags.go
Last active April 24, 2016 22:46
Plugin Flags
var flags = []cli.Flag{
cli.StringFlag{
Name: "repo.fullname",
Usage: "repository full name",
EnvVar: "DRONE_REPO",
},
cli.StringFlag{
Name: "repo.owner",
Usage: "repository owner",
@bradrydzewski
bradrydzewski / build_latest.go
Last active April 14, 2016 22:32
Drone nightly build
package main
import (
"flag"
"log"
"strings"
"github.com/drone/drone-go/drone"
)
// +build ignore
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
@bradrydzewski
bradrydzewski / gist:c304e05d4e0e493e8f42
Created October 12, 2014 00:10
Test Email Configuration
package main
import (
"net/smtp"
)
type Email struct {
Recipients []string
Host string
Port string
@bradrydzewski
bradrydzewski / generate_docker_cert.sh
Last active May 27, 2024 15:59
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@bradrydzewski
bradrydzewski / install.sh
Created June 18, 2014 16:26
Install Postgres 9.3
#!/bin/bash
# remove existing 9.1 installation
sudo /etc/init.d/postgresql stop
sudo apt-get --force-yes -fuy remove --purge postgresql postgresql-9.1 postgresql-client
# install 9.3
sudo apt-get install python-software-properties
sudo add-apt-repository 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main'
sudo apt-get update