Skip to content

Instantly share code, notes, and snippets.

View robertgzr's full-sized avatar
🐧

Robert Günzler robertgzr

🐧
View GitHub Profile
@robertgzr
robertgzr / .envrc
Created March 2, 2023 13:32
circleci insights to csv
export CIRCLE_TOKEN={apitoken}
export START_DATE=2022-12-01T12:00:00Z
export END_DATE=2023-03-01T12:00:00Z
@robertgzr
robertgzr / Makefile
Last active February 21, 2023 14:38
jsc.mini
jscmini: CXX := clang++
jscmini: CFLAGS += -stdlib=libc++ -std=c++20
jscmini: CFLAGS += -fexperimental-library
jscmini: CFLAGS += $(shell pkg-config --cflags --libs javascriptcoregtk-5.0)
jscmini: CFLAGS += -fuse-ld=lld -Wl,--as-needed
jscmini:
$(CXX) -Wall $(CFLAGS) -o $@ main.cc
.PHONY: run
@robertgzr
robertgzr / Makefile
Created October 24, 2022 18:19
repro gcc + sysroot leaking host libc into build env
export CC := clang
CFLAGS ?= -Wall -Werror -Wl,--trace -v
ifneq ($(SYSROOT),)
CFLAGS += --sysroot $(SYSROOT)
endif
ifneq (,$(findstring clang,$(CC)))
platform := $(shell uname -s)/$(shell uname -m)
ifeq ($(platform),Linux/x86_64)
@robertgzr
robertgzr / .ssh_config
Last active February 15, 2022 14:23
use balena-proxy with local ssh
# support
Host balenadevice bal
User <balena-cloud-user-id>
Hostname ssh.balena-devices.com
LogLevel ERROR
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
RequestTTY force
ControlMaster no
root@Bridge2010038041:~# balena network inspect 1835016_bridge_gateway
[
{
"Name": "1835016_bridge_gateway",
"Id": "18b24e30360d5d6e9c34eee6717d5a176dfc3d7fc1e2ec8edc81ca0e5f1c979f",
"Created": "2021-12-16T11:33:52.403689961Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
@robertgzr
robertgzr / get-image
Created December 6, 2021 18:03
query balena-cloud for images associated with a release
#!/bin/sh
set -e
[ -n "$DEBUG" ] && set -x
if [ "$1" = "-h" ]; then
printf "usage: %s TOKEN RELEASE_ID\n" "$0"
exit 0
fi
@robertgzr
robertgzr / readme.md
Last active October 15, 2021 11:26
private registry cache

registry compose file

version: '2.4'

services:
  cache:
    image: registry:2
    network_mode: host
    environment:
{
"Containers": [
{
"Id": "7d883a34f8a4d94f133ad6ec77cdc47fef7b66c1cbc255aa2323b936d7d24f49",
"Name": "/agitated_austin",
"Created": "2021-06-23T14:27:12.019792896Z",
"Image": "sha256:97dac40ab62861586137d45d328f95c2c08cf8fd9278284abfbf1c4225da6e15",
"Config": {
"Labels": {
"io.balena.architecture": "armv7hf",
#!/bin/sh
# Test for the presence of
# [PATCH] ovl: fix regression caused by overlapping layers detection
# https://github.com/amir73il/linux/commit/9995d3a5ee3851a6883b0627b703e64146291453
#
# we create an overlay mount using /lower, /upper0/u and /upper0/w
# we then try to create another overlay mount that references the previous
# upperdir `upper0/u` as it's lowerdir
#
Jul 09 15:46:02 7a06849 balenad[24688]: runtime/cgo: pthread_create failed: Resource temporarily unavailable
Jul 09 15:46:02 7a06849 balenad[24688]: SIGABRT: abort
Jul 09 15:46:02 7a06849 balenad[24688]: PC=0x76dd9c46 m=2 sigcode=4294967290
Jul 09 15:46:02 7a06849 balenad[24688]: goroutine 0 [idle]:
Jul 09 15:46:02 7a06849 balenad[24688]: runtime: unknown pc 0x76dd9c46
Jul 09 15:46:02 7a06849 balenad[24688]: stack: frame={sp:0x66ae98f8, fp:0x0} stack=[0x662ea1b4,0x66ae9db4)`
Jul 09 15:09:47 7a06849 balenad[1237]: runtime/cgo: pthread_create failed: Resource temporarily unavailable
Jul 09 15:09:47 7a06849 balenad[1237]: SIGABRT: abort
Jul 09 15:09:47 7a06849 balenad[1237]: PC=0x76db1c46 m=2 sigcode=4294967290
Jul 09 15:09:47 7a06849 balenad[1237]: goroutine 0 [idle]: