Skip to content

Instantly share code, notes, and snippets.

@carlosonunez
carlosonunez / tailscale-entrypoint.sh
Created December 9, 2024 23:15
Docker image entrypoint provided for Tailscale ACL issue
#!/usr/bin/env bash
TAILSCALE_HOSTNAME="${TAILSCALE_HOSTNAME:-test-$(date +%s)}"
verify_proxy_host_port_defined() {
for var in PROXY_HOST PROXY_PORT \
TAILSCALE_AUTH_KEY TAILSCALE_EXIT_NODE_IP
do
test -n "${!var}" && continue
>&2 echo "Bootstrap env var not defined: $var"
return 1
done
@carlosonunez
carlosonunez / run.log
Created November 17, 2024 22:22
Packer `efi_mode=false` issue
2024/11/17 16:08:39 [INFO] Packer version: 1.9.4 [go1.21.1 darwin arm64]
2024/11/17 16:08:39 [TRACE] discovering plugins in
2024/11/17 16:08:39 [TRACE] discovering plugins in /opt/homebrew/bin
2024/11/17 16:08:39 [INFO] Discovered potential plugin: qemu = /opt/homebrew/bin/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.0_x5.0_darwin_arm64
2024/11/17 16:08:39 [INFO] Discovered potential plugin: vagrant = /opt/homebrew/bin/github.com/hashicorp/vagrant/packer-plugin-vagrant_v1.1.5_x5.0_darwin_arm64
2024/11/17 16:08:39 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2024/11/17 16:08:39 [INFO] found external [-packer-default-plugin-name-] builders from vagrant plugin
2024/11/17 16:08:39 [INFO] found external [-packer-default-plugin-name- cloud registry] post-processors from vagrant plugin
2024/11/17 16:08:39 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2024/11/17 16:08:39 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/cn/.p
@carlosonunez
carlosonunez / debloat_onyx_go_color_7.md
Last active February 13, 2025 03:01
Debloating the Go Color 7, Go 10.3, and Page 7, step by step

This guide will help you root, de-bloat and secure the amazing Onyx BOOX Go Color 7, an amazing Android-based eReader.

The guide assumes that you are using a Mac with Homebrew installed and have just unboxed the device and are turning it on for the first time. (Congrats!)

Why?

  • You're concerned about the amount of data this device sends to .cn servers.
  • You want a lean and mean eReader a la Kindle.
  • You're bored and need something fun to do!

Keybase proof

I hereby claim:

  • I am carlosonunez on github.
  • I am carlosonunez (https://keybase.io/carlosonunez) on keybase.
  • I have a public key whose fingerprint is 04AA 63BE 42B0 0911 2842 CB5F 2968 5679 14AF D2EF

To claim this, I am signing this object:

@carlosonunez
carlosonunez / Dockerfile
Last active February 4, 2024 15:47
ugit, but even smaller!
FROM alpine:3.18 as base
ENV ESSENTIAL="tar sh"
ENV DEPS="ugit git fzf tput nl cut bash sed awk tr env xargs"
RUN apk add --no-cache \
bash \
coreutils \
git \
ncurses \
ncurses-terminfo \
@carlosonunez
carlosonunez / lima.yaml
Created November 12, 2023 16:42
Lima example
# A template to use Docker (rootful) instead of containerd & nerdctl
# $ limactl start ./docker-rootful.yaml
# $ limactl shell docker-roootful docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list docker-rootful --format 'unix://{{.Dir}}/sock/docker.sock')
# $ docker ...
# This template requires Lima v0.8.0 or later
images:
@carlosonunez
carlosonunez / log.txt
Created May 19, 2023 16:25
minikube + qemu2 + !kindnet issue
*
* ==> Audit <==
* |---------|-------------------------------------------------------|----------|------|---------|---------------------|---------------------|
| Command | Args | Profile | User | Version | Start Time | End Time |
|---------|-------------------------------------------------------|----------|------|---------|---------------------|---------------------|
| start | --cni=calico | minikube | cn | v1.30.1 | 18 May 23 18:37 CDT | 18 May 23 18:38 CDT |
| delete | | minikube | cn | v1.30.1 | 18 May 23 18:39 CDT | 18 May 23 18:39 CDT |
| start | --cni=calico | minikube | cn | v1.30.1 | 18 May 23 18:39 CDT | 18 May 23 18:39 CDT |
| start | --cni=/tmp/antrea.yaml | minikube | cn | v1.30.1 | 18 May 23 18:40 CDT | |
| delete |
@carlosonunez
carlosonunez / AssumeRolePolicy.json
Created March 7, 2023 13:27
Use this JSON to create the AssumeRolePolicy IAM policy used within "Kubernetes: Your First Project".
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["sts:AssumeRole"],
"Resource": "*"
}]
}
@carlosonunez
carlosonunez / 0.10.0-kubelet-logs
Created March 25, 2022 04:13
logs from kubelet in kind cluster for TCE v0.10.0
This file has been truncated, but you can view the full file.
-- Logs begin at Fri 2022-03-25 04:01:58 UTC, end at Fri 2022-03-25 04:11:11 UTC. --
Mar 25 04:01:58 test-control-plane systemd[1]: Started kubelet: The Kubernetes Node Agent.
Mar 25 04:01:58 test-control-plane kubelet[126]: Flag --fail-swap-on has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Mar 25 04:01:58 test-control-plane kubelet[126]: E0325 04:01:58.628965 126 server.go:204] "Failed to load kubelet config file" err="failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file \"/var/lib/kubelet/config.yaml\", error: open /var/lib/kubelet/config.yaml: no such file or directory" path="/var/lib/kubelet/config.yaml"
Mar 25 04:01:58 test-control-plane systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Mar 25 04:01:58 test-control-plane system
arch: default
images:
- location: "~/Downloads/impish-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "~/Downloads/impish-server-cloudimg-arm64.img"
arch: "aarch64"
- location: https://github.com/lima-vm/alpine-lima/releases/download/v0.2.3/alpine-lima-rd-3.14.3-aarch64.iso
arch: "aarch64"
digest: "sha512:277d2140f9c8adb2d1777103c6ce69cc079375d66944f8745d6f786216e3a7b197e813384a6c113b3fdf78e4f65bb129b997f358819daa2a3af113b1caab0dba"
- location: https://github.com/lima-vm/alpine-lima/releases/download/v0.2.3/alpine-lima-rd-3.14.3-x86_64.iso