Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

darron froese darron

🎯
Focusing
View GitHub Profile
@darron
darron / ecr-empty-repos.sh
Created Feb 27, 2017
Figure out which repos in ECR are empty.
View ecr-empty-repos.sh
export REPOS=$(aws ecr describe-repositories | jq '.repositories | .[].repositoryName' | cut -d'"' -f 2)
for repo in $REPOS;
do
IMAGES=$(aws ecr list-images --repository-name $repo | grep imageDigest)
if [[ "$?" -eq "1" ]]
then
echo "$repo: empty"
fi
done
View gist:3ab0c517b71b96cd9567098675dbc246
Helm Chart Hosting
Github Pages:
https://harness.io/blog/devops/helm-chart-repo/
https://faun.pub/how-to-host-helm-chart-repository-on-github-b76c854e1462
Private Github Repo (GITHUB_TOKEN):
https://blog.softwaremill.com/hosting-helm-private-repository-from-github-ff3fa940d0b7
@darron
darron / CNAME
Created Nov 20, 2013
Example octohost CNAME file.
View CNAME
another-test-site.ip.address.here.xip.io
add-other-records-here.ip.address.here.xip.io
as-many-as-you-like.ip.address.here.xip.io
website.example.com
another-address.example.com
View gist:811cf41a6ec3dbfcb97a
#!/bin/bash
# You need: curl, jq, and ipcalc to run this.
# You should already have cut, sort and uniq if you're on OS X or Linux.
RANGES=$(curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq .prefixes | jq '.[] | select(.region=="us-east-1")' | jq 'select(.service=="EC2")' | jq .ip_prefix | cut -d '"' -f 2 | sort | uniq)
for range in $RANGES
do
MIN=$(ipcalc -bn $range | grep "HostMin" | cut -d ':' -f 2)
View buildpack.diff
diff --git a/bin/test-compile b/bin/test-compile
index 219a688..0a21748 100755
--- a/bin/test-compile
+++ b/bin/test-compile
@@ -24,5 +24,5 @@ if [ -f "${build}/.golangci.yml" -o -f "${build}/.golangci.toml" -o -f "${build}
step "/.golangci.{yml,toml,json} detected"
tmp="$(mktemp -d)"
mkdir -p "${build}/.heroku/golangci/bin"
- ensureFile "golangci-lint-1.16.0-linux-amd64.tar.gz" "${tmp}" "tar -C ${build}/.heroku/golangci/bin --strip-components=1 -zxf"
-fi
@darron
darron / gist:5f0b869d5e309db26ad3
Created Apr 8, 2015
AWS user-data for automatically registering with a Chef Server.
View gist:5f0b869d5e309db26ad3
#!/bin/bash
apt-get update
apt-get -y upgrade
# Install s3cmd to get the validation.pem
pip install python-dateutil
cd /tmp
wget https://github.com/s3tools/s3cmd/releases/download/v1.5.2/s3cmd-1.5.2.tar.gz
tar -xf s3cmd-1.5.2.tar.gz
@darron
darron / Gemfile
Last active Nov 27, 2018
Sidekiq in Padrino
View Gemfile
source 'https://rubygems.org'
# Distribute your app as a gem
# gemspec
# Server requirements
# gem 'thin' # or mongrel
# gem 'trinidad', :platform => 'jruby'
# Optional JSON codec (faster performance)
View encrypted.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
name: encrypted
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
encrypted: "true"
View gist:be4c7eb2daf32ba62b414118d5d73e9e
Verifying my Blockstack ID is secured with the address 1AWSQztDoP2MnV78edrypjpGV9suHEsuwd https://explorer.blockstack.org/address/1AWSQztDoP2MnV78edrypjpGV9suHEsuwd
@darron
darron / default_ami_setup.sh
Last active Sep 5, 2017
Ubuntu 14.04 AWS Instance Store HVM build - actually worked - built and booted. Much thanks to: https://github.com/Lumida/packer/wiki/Building-Ubuntu-12.04-and-14.04-HVM-Instance-Store-AMIs
View default_ami_setup.sh
#!/bin/bash
# server-jre-8u5-linux-x64.tar.gz
DEBIAN_FRONTEND=noninteractive
UCF_FORCE_CONFFNEW=true
export UCF_FORCE_CONFFNEW DEBIAN_FRONTEND
apt-get update
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" dist-upgrade