Skip to content

Instantly share code, notes, and snippets.

View developer-guy's full-sized avatar
🐾
Every artifact can be verifiably traced to Source Code and Hardware

Batuhan Apaydın developer-guy

🐾
Every artifact can be verifiably traced to Source Code and Hardware
View GitHub Profile
@saiyam1814
saiyam1814 / kubernetes-containerd.sh
Created July 25, 2022 08:42
kubernetes-containerd.sh
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "step1"
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
echo "kubeadm install"
sudo apt update -y
sudo apt -y install vim git curl wget kubelet=1.24.3-00 kubeadm=1.24.3-00 kubectl=1.24.3-00
echo "memory swapoff"
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
sudo swapoff -a
sudo modprobe overlay
# Set the tag
VERSION=v20220513-16d73c5543
# Get the digest for the amd64 image
DIGEST=$(crane manifest gcr.io/tekton-nightly/github.com/tektoncd/pipeline/cmd/controller:${VERSION} | jq -r '.manifests[] | select(.platform.architecture=="amd64") | .digest')
# Download the SBOM
cosign download sbom gcr.io/tekton-nightly/github.com/tektoncd/pipeline/cmd/controller@${DIGEST}
Found SBOM of media type: text/spdx
SPDXVersion: SPDX-2.2
@wagoodman
wagoodman / minimal.go
Last active November 14, 2023 08:52
Using syft as a library
package main
import (
"fmt"
"github.com/anchore/syft/syft"
"github.com/anchore/syft/syft/format"
"github.com/anchore/syft/syft/sbom"
"github.com/anchore/syft/syft/source"
)
@Dentrax
Dentrax / copy-helm-images.sh
Last active December 13, 2021 14:56
Get all images in helm chart and copy to internal registry
#!/bin/bash
set -e
function usage(){
echo "$(basename $0) --registry registry.gitlab.com/images --platform linux/amd64 --chart fluent/fluent-bit --version 0.19.10" >&2
}
function teardown {
rm -rf "./tmp"
@imjasonh
imjasonh / .ko.yaml
Last active December 3, 2021 23:17
Reproducing multi-arch Go build performance in `docker buildx` vs `ko`
defaultBaseImage: gcr.io/imjasonh/combined
@phortuin
phortuin / signing-git-commits.md
Last active May 14, 2024 15:02
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@exocode
exocode / README-kubedb-postgis.md
Created November 2, 2021 01:07
Setup HA-Postgis with KubeDB (on Minikube) - The fast way

Setup KubeDB (on Minikube) - The fast way

Install Minikube

Create a Minikube (or Kind) cluster with

  • at least 2 CPUs
  • nailed down to Kubernetes version 1.21.x
  • and enough memory
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 24, 2024 15:56
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@smartameer
smartameer / prepare-commit-msg
Created July 6, 2021 19:35
Git coauthor hook for pre-commit message
#!/bin/bash
function prompt_for_multiselect {
# little helpers for terminal print control and key input
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
RESTORE='\033[0m'
ESC=$( printf "\033")
cursor_blink_on() { printf "$ESC[?25h"; }