Skip to content

Instantly share code, notes, and snippets.

@radekg
radekg / installing-ada-on-arm-macos.sh
Created November 1, 2024 17:15
Installing Ada on arm macOS
brew install texinfo bison m4 flex
curl -L https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-13.2.0-1/gnat-x86_64-darwin-13.2.0-1.tar.gz | tar xzf -
git clone --depth=1 https://github.com/iains/gcc-13-branch gcc-13.2.0
export PATH=$PWD/gnat-x86_64-darwin-13.2.0-1/bin:$PATH
cd gcc-13.2.0
./contrib/download_prerequisites
mkdir ../build
cd ../build
CC="x86_64-apple-darwin21.6.0-gcc" CXX="x86_64-apple-darwin21.6.0-g++" \
../gcc-13.2.0/configure \
@radekg
radekg / fix-xcode-select-error-xcodebuild-requires-xcode.md
Created October 3, 2022 13:49 — forked from berkedel/fix-xcode-select-error-xcodebuild-requires-xcode.md
Fix `xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`

Tried to create react app

npx create-react-app app

Unfortunately, got an xcodebuild error

node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-darwin-x64.tar.gz
@radekg
radekg / 01-filesystem.pl
Last active September 3, 2022 18:45
Blog: Zanzibar-style ACLs in Prolog
directory(
dirname('data'),
objectid('851a7566-b83d-4993-bd04-9b8244091d45'),
parent(objectid())).
directory(
dirname('documents'),
objectid('b94c1f40-818b-47be-882b-ce1a8fbee254'),
parent(
objectid('851a7566-b83d-4993-bd04-9b8244091d45'))).
@radekg
radekg / Dockerfile
Last active May 15, 2022 00:57
Build Strimzi Kafka image with Spiffe principal builder
FROM quay.io/strimzi/kafka:0.28.0-kafka-3.1.0
COPY .output/kafka-spiffe-principal-2.0.1-istio.jar /opt/kafka/libs/kafka-spiffe-principal-2.0.1-istio.jar
@radekg
radekg / ca-generate.sh
Last active June 23, 2022 11:00
cfssl root CA with intermediate
#!/bin/bash
set -eu
CA_NAME=${CA_NAME:-ca}
# generate a root CA:
cfssl gencert -initca config-root.json | cfssljson -bare "${CA_NAME}"
rm "${CA_NAME}.csr"
@radekg
radekg / README.md
Created November 30, 2021 02:01 — forked from nmarley/README.md
Go / C++ bindings example

Go / C++ bindings example

This is an example of Go code calling to a C++ library with a C wrapper.

Build

go build  # this only ensures it compiles
@radekg
radekg / custom-resources.yaml
Last active November 15, 2021 02:23
k3s on multipass: calico + longhorn
# This section includes base Calico installation configuration.
# For more information, see: https://docs.projectcalico.org/v3.21/reference/installation/api#operator.tigera.io/v1.Installation
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
# Configures Calico networking.
calicoNetwork:
# Note: The ipPools section cannot be modified post-install.
@radekg
radekg / Dockerfile
Last active July 31, 2021 00:28
YugabyteDB Postgres extension build infrastructure with an extension template
FROM postgres:11.2
RUN apt-get update \
&& apt-get install -y build-essential \
libpq5=11.12-1.pgdg90+1 \
libpq-dev=11.12-1.pgdg90+1 \
postgresql-server-dev-11
@radekg
radekg / Dockerfile
Last active May 7, 2022 06:57
YugabyteDB build toolchain for PostgreSQL extensions
#
# YugabyteDB build steps from:
# https://docs.yugabyte.com/latest/contribute/core-database/build-from-src-centos/
#
FROM centos:7.9.2009
ARG GCC_VERSION=7.3.0
ARG YB_VERSION=2.7.1.1
ARG MAKE_GCC_PARALLELISM=16
FROM centos:7.9.2009 as builder
ARG YB_VERSION=2.7.1.1
RUN yum update -y && yum install -y wget curl \
&& wget https://downloads.yugabyte.com/yugabyte-${YB_VERSION}-linux.tar.gz -O /yugabyte-${YB_VERSION}-linux.tar.gz
FROM centos:7.9.2009
ARG GID=1060
ARG GROUPNAME=myybuser
ARG UID=1060