Skip to content

Instantly share code, notes, and snippets.

View fujin's full-sized avatar

AJ Christensen fujin

  • Rotorua, New Zealand
View GitHub Profile
@palewire
palewire / README.md
Last active November 8, 2024 07:25
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

@gramidt
gramidt / Dockerfile
Last active December 2, 2021 18:56
OpenTelemetry Collector ARM Dockerfile
ARG OTEL_CONTRIB_COLLECTOR_VERSION=v0.23.0
FROM alpine:3.13 as certs
RUN apk --update add ca-certificates
FROM alpine:3.13 AS otelcol
ARG OTEL_CONTRIB_COLLECTOR_VERSION
RUN wget -O /otelcontribcol "https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/download/${OTEL_CONTRIB_COLLECTOR_VERSION}/otelcontribcol_linux_arm64"
RUN chmod 755 /otelcontribcol
@robbmanes
robbmanes / watch-unix-socket.stp
Last active October 17, 2024 07:43
Systemtap script to watch UNIX socket input
/*
* watch_unix_socket.stp
*
* This is a simply more modern version of the script found here:
* https://sourceware.org/systemtap/wiki/WSunixSockets
*
* The first argument is the location of the file descriptor for a UNIX socket.
* To find this address, for example, for the Docker socket run:
*
* # lsof 2>&1 | awk '/docker.sock/ {print $7}' | grep -v '0t0' | sort -u
@tobert
tobert / reclaimWin10.ps1
Created April 3, 2017 19:49
locally customized version of the Win10 setup script
##########
# Win10 Initial Setup Script
# Author: Disassembler <[email protected]>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active September 7, 2024 18:11 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@joemiller
joemiller / install-needrestart.sh
Last active August 29, 2015 14:14
quick script to # install `needrestart` on fedora (cent/rhel/etc)
#!/bin/sh
# install `needrestart` on fedora (cent/rhel/etc)
# tested on fedora-19 and 20
set -e
yum -y -d1 install perl-Module-ScanDeps perl-Proc-ProcessTable perl-Sort-Naturally perl-Term-ProgressBar-Simple perl-Module-Find.noarch perl-ExtUtils-MakeMaker.noarch
git clone -b 'v2.0' https://github.com/liske/needrestart.git
cd needrestart
@brianbianco
brianbianco / gist:cb8a9f73a39ed1f42934
Created October 13, 2014 20:36
Shared volumes OS X / Docker
  $ cd ~/.boot2docker
  $ curl http://static.dockerfiles.io/boot2docker-v1.2.0-virtualbox-guest-additions-v4.3.14.iso > boot2docker.iso
  $ boot2docker init
  $ VBoxManage sharedfolder add boot2docker-vm -name home -hostpath /Users
  $ boot2docker up
 
  $ boot2docker ssh "sudo modprobe vboxsf && mkdir -v -p /Users && sudo mount -v -t vboxsf  -o uid=0,gid=0 home /Users"
@kennwhite
kennwhite / nginx_1.6.x.conf
Last active August 29, 2015 14:06
CentOS, Red Hat, Amazon Linux nginx config: A+ SSL Labs rating w/ strong legacy compatibility
# Strong nginx config for SSL Labs rating A as of 3-2015
# Broad legacy compatibility including IE8, Android 2.3+, openssl 0.9.8 clients
# Blocks most bot scan IP probes.
#
# *** Assumes: _HOSTNAME_ is replaced ***
# *** Assumes: Diffie-Hellman parameters have been generated (see: dhparam below)
#
# Includes OCSP stapling, HSTS Strict Transport security,
# session resumption, legacy backwards compatibility (XP, Android 2.3-4.3)
#
@fujin
fujin / blackout.md
Last active July 25, 2016 18:16
Blackout Super MiniH + FPV + Radio
@andyshinn
andyshinn / README.md
Last active March 24, 2022 06:40
CoreOS on Digital Ocean using Terraform

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key