Skip to content

Instantly share code, notes, and snippets.

View robertgzr's full-sized avatar
🐧

Robert Günzler robertgzr

🐧
View GitHub Profile
@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
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 / .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
@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 / 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 / .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