Skip to content

Instantly share code, notes, and snippets.

@lawrencejones
lawrencejones / Makefile
Last active April 24, 2023 13:04
Why you need a service registry
make-it-rain.json: make-it-rain.jsonnet
jsonnet -J $(ANU_ROOT)/utopia/lib -J $(ANU_ROOT)/utopia/jvendor $^ > $@
@ghostsquad
ghostsquad / secrets.seal.sh
Created August 28, 2020 17:49
secrets.seal.sh
#! /usr/bin/env bash
set -Eeuo pipefail
scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
source "${scripts_dir}/functions.sh"
test_jq
test_yq
test_kubeseal
@quiye
quiye / yjy.md
Last active April 21, 2024 23:25
yaml to jsonnet to yaml
@maddie
maddie / update-v2ray-geo.sh
Last active June 25, 2025 15:03
Script for updating V2Ray geoip.dat and geosite.dat on OpenWRT
#!/bin/sh
LOGGER_TAG=v2ray-geodata-updater
log () {
echo $@
logger -t $LOGGER_TAG "$@"
}
log "fetching geoip url..."
@atheiman
atheiman / README.md
Last active April 5, 2023 13:29
Vault secret saved as file in app pod

These Kubernetes resource manifest yaml files demonstrate

  1. vault.yaml
  • setting up a test vault service
  • configuring the vault service with kubernetes auth and a role for a test app
  1. app.yaml
  • running an app with a vault-init initContainer to login to vault and obtain a token
  • a vault-secret-manager container to continuously interact with vault throughout the lifecycle of the app
  • an app container to use the secret saved by the vault-secret-manager container
@iamtakingiteasy
iamtakingiteasy / master-and-worker-ignition.yaml
Last active December 24, 2021 14:21
CoreOS ignition file for setting up kubernetes master+worker node
passwd:
users:
- name: "root"
groups:
- "sudo"
- "wheel"
password_hash: "$6$gO2u2Sjk$Q5T/SqiwFzK95jRqO6FArDDmDGmdXblnKHtL4HiA.NrGgfJk8CJF5AfAfoMt8kF/jlsqHEgRDxYOFYzw9sroS/"
- name: "user"
groups:
- "sudo"
@serdroid
serdroid / gist:7bd7e171681aa17109e3f350abe97817
Created October 17, 2017 12:24
create commit and push to repo during CI build in gitlab
- generate ssh key for gitlab-runner user
- add ssh key to project's deploy keys (project/setting/repository)
add below commands into script section of .gitlab-ci.yml file.
# CI_REPOSITORY_URL contains gitlab-ci-token. replace start of the string up to '@' with git@' and append a ':' before first '/'
# example
# CI_REPOSITORY_URL=https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@example.com/gitlab-examples/ci-debug-trace.git
# should be git@example.com:/gitlab-examples/ci-debug-trace.git
- export PUSH_REPO=$(echo "$CI_REPOSITORY_URL" | sed -e "s|.*@\(.*\)|git@\1|" -e "s|/|:/|" )