Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / GPG_and_GIT.md
Last active March 9, 2024 22:10 — forked from JamesOBenson/Generating a secure SSH Key and commands
SSH Generation and commands for GIT and GPG

GPG and GIT and SSH ... OH MY!

ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C gears@umich.edu -N ''
  • Then you won't be prompted for a passphrase. However, if you did have a passphrase:
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C gears@umich.edu -N 'Really do not use this passphrase'
  • Then you will be prompted to type your passphrase every time you interact with git remote (pull, push, fetch, etc.) This is intolerable.
@G-UK
G-UK / Raspberry Pi 4 Arm64 Kernel Cross-Compile.md
Last active August 24, 2023 13:31
Building the Raspberry Pi 4 Arm64 Linux Kernel

The Raspberry Pi foundation have now released a beta version of an official 64-bit Kernel which can be installed using the rpi-update script. The rpi-update script can be found at https://github.com/Hexxeh/rpi-update/blob/master/rpi-update or through the Raspbian repositories

Introduction

The objective of these instructions is to build a stock 64bit Linux Kernel for use on the Raspberry Pi 4B on a Debian x64 machine (Windows Subsystem for Linux in my case), and deploy on the Raspberry Pi.

Notes:

  • Transfer to Pi is using my NAS in this example, replace with shared drive/memory stick etc. as required.
    • (N: drive on Windows and /mnt/NAS on Linux in this example).
  • For a specific Kernel version replace the 4.19 with the wanted version in the git clone command.
  • Greater than 3GB RAM only currently available on Kernel 4.19
@MarioCarrion
MarioCarrion / tests.sh
Created July 4, 2019 18:29
Go coverage + test for each and all packages
#!/bin/bash
#
# scripts/test.sh
#
# * Generates `coverage/index.html`: HTML artifact for download,
# * Generates `coverage/report.xml`: report of failed tests in Junit format, and
# * Validates the minimum code coverage still applies.
#
# Depends on:
# * github.com/jstemmer/go-junit-report
####################
# Create a cluster #
####################
# Install [AWS CLI](https://aws.amazon.com/cli/) and make sure you have AWS admin permissions
# Install [eksctl](https://github.com/weaveworks/eksctl)
export AWS_ACCESS_KEY_ID=[...] # Replace [...] with the AWS Access Key ID
ARG FUNCTION_RUNTIME
FROM mikesir87/aws-cli as code
ARG FUNCTION_NAME
ARG AWS_DEFAULT_REGION
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
RUN wget -O function.zip `aws lambda get-function --function-name $FUNCTION_NAME --query 'Code.Location' --output text`
@rdump
rdump / kubectl-multi-version-brews.md
Last active April 4, 2024 15:20
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

Applicability

The instructions below apply to older versions of Homebrew which still provide switch capability.

For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions

MacPorts is now keeping versioned installations available as well, by default.

@pahud
pahud / main.workflow
Last active July 24, 2023 08:20
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"
@teejaded
teejaded / kubecon_curl.sh
Last active May 23, 2019 08:51 — forked from alex-slynko/kubecon_curl.sh
Download kubecon na 2018 presentations from Sched
#!/bin/bash
function process_link() {
local LINK FILE_URL FILE_URLS FILENAME
LINK=$1
FILE_URLS=$(curl -s https://kccna18.sched.com${LINK} | grep "file-uploaded" | cut -d\" -f 4)
for FILE_URL in $FILE_URLS; do
FILENAME=${LINK#https:*}
FILENAME="${FILENAME##/*/}.${FILE_URL##*.}"
echo "Downloading $FILENAME" >&2
@disintegrator
disintegrator / https-during-dev.macos.sh
Last active April 23, 2024 22:41
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
brew install caddy mkcert nss dnsmasq
mkcert -install
mkcert '*.app.test' '*.cdn.test'
# rename the certs and move them under /usr/local/etc/caddy/certs
cat <<EOF > /usr/local/etc/caddy/Caddyfile
*.app.test:443, *.cdn.test:443 {
@jdaily
jdaily / main.go
Created October 26, 2018 20:05
Interactive golang cli with promptui
package main
import (
"fmt"
"log"
"os"
"github.com/go-ozzo/ozzo-validation"
"github.com/go-ozzo/ozzo-validation/is"
"github.com/manifoldco/promptui"