Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Coffman StevenACoffman

  • Khan Academy
  • Ann Arbor, MI
View GitHub Profile
@salrashid123
salrashid123 / signer.go
Created Aug 4, 2020
basic GCP IAMCredentials `crypto.Signer()`
View signer.go
package kms
import (
"crypto"
"encoding/base64"
"io"
"sync"
"context"
"fmt"
@droyo
droyo / grpc-generate-access-token.go
Created Dec 26, 2019
GCP iamcredentials.googleapis.com GenerateAccessToken GRPC example
View grpc-generate-access-token.go
package main
import (
"log"
"flag"
"path"
"time"
"context"
"github.com/kr/pretty"
@tvvignesh
tvvignesh / .gitlab-ci.yml
Created Dec 22, 2019
Example on running Skaffold with GITLAB CI for Kubernetes in GKE (Make sure you modify it appropriately and set GCP_SERVICE_KEY and GCP_PROD_SERVICE_KEY variable in Gitlab with the service account json value)
View .gitlab-ci.yml
services:
- docker:dind
stages:
- development
- production
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ''
@salrashid123
salrashid123 / main.go
Created Nov 9, 2019
Sample golang app that uses the Google CLoud Admin SDk to create a user and then add that user to a specific google group
View main.go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"golang.org/x/net/context"
@StevenACoffman
StevenACoffman / GPG_and_GIT.md
Last active Jan 27, 2021 — forked from JamesOBenson/Generating a secure SSH Key and commands
SSH Generation and commands for GIT and GPG
View GPG_and_GIT.md

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 Jun 3, 2021
Building the Raspberry Pi 4 Arm64 Linux Kernel
View Raspberry Pi 4 Arm64 Kernel Cross-Compile.md

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
View eks-jx-serverless.sh
####################
# 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
View lambda2img.Dockerfile
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`
@pahud
pahud / main.workflow
Last active Jun 8, 2021
Github Actions with Amazon EKS CI/CD
View main.workflow
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 — forked from alex-slynko/kubecon_curl.sh
Download kubecon na 2018 presentations from Sched
View kubecon_curl.sh
#!/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