Skip to content

Instantly share code, notes, and snippets.

View cxhercules's full-sized avatar
🏠
Working from home

Christian Hercules cxhercules

🏠
Working from home
  • cxh
  • CA
View GitHub Profile
@cxhercules
cxhercules / 3sync.go
Created November 16, 2016 18:45 — forked from rossdylan/3sync.go
attempting to sync files to s3 using golang and goamz
package main
import (
"crypto/md5"
"flag"
"fmt"
"io"
"launchpad.net/goamz/aws"
"launchpad.net/goamz/s3"
"os"

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@cxhercules
cxhercules / Compiling Yubico yubico-piv-tool
Last active December 19, 2016 07:28
Compiling Yubico yubico-piv-tool
I was getting this error when doing normal configure, make, and install magic:
./configure
make
Making all in lib
Making all in .
CC ykpiv.lo
ykpiv.c:37:10: fatal error: 'openssl/des.h' file not found
#include <openssl/des.h>
^
#!/bin/bash
# Create .gitkeep files to add "empty" folders to git
function gitkeep () {
find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \;
}
# Docker
function docker-set () {
DockerStatus=`docker-machine status`
@cxhercules
cxhercules / install-python.sh
Created May 10, 2017 18:38 — forked from osterman/install-python.sh
Install Python on CoreOS
#!/bin/bash -uxe
VERSION=2.7.13.2713
PACKAGE=ActivePython-${VERSION}-linux-x86_64-glibc-2.3.6-401785
# make directory
mkdir -p /opt/bin
cd /opt
wget http://downloads.activestate.com/ActivePython/releases/${VERSION}/${PACKAGE}.tar.gz
Thu Jul 6 22:17:53 UTC 2017
@cxhercules
cxhercules / generate.sh
Created September 20, 2017 06:47
Create a Wildcard SubjectAltName Self-Signed Certificate
#!/usr/bin/env bash
# See: http://apetec.com/support/GenerateSAN-CSR.htm
# See: http://fbcs.co.uk/self-signed-multiple-domain-ssl-certificates/
# See: https://gist.github.com/scottvrosenthal/5691305
# Make a temp directory and go there
TMP_DIR=$(mktemp -d)
cd $TMP_DIR
echo $(pwd)
## https://github.com/rbenv/ruby-build/issues/377#issuecomment-310569462
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.3.4
@cxhercules
cxhercules / genkeys.sh
Last active January 25, 2018 07:27 — forked from jhamrick/genkeys.sh
Generate SSL certificates with IP SAN
#!/usr/bin/env bash
#
# Generate a set of TLS credentials that can be used to run development mode.
#
# Based on script by Ash Wilson (@smashwilson)
# https://github.com/cloudpipe/cloudpipe/pull/45/files#diff-15
#
# usage: sh ./genkeys.sh NAME HOSTNAME IP
set -o errexit
@cxhercules
cxhercules / fork forced sync
Created July 25, 2018 15:15 — forked from glennblock/fork forced sync
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master