Skip to content

Instantly share code, notes, and snippets.

View siepkes's full-sized avatar

Jasper Siepkes siepkes

View GitHub Profile
@bahamat
bahamat / cmon.sh
Last active April 25, 2024 18:43
Shell script to pull CMON metrics from Joyent Triton (https://www.joyent.com/triton)
#!/bin/bash
# shellcheck disable=SC2154
if [[ -n "$TRACE" ]]; then
export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -o xtrace
fi
export PATH=/opt/pkg/bin:/opt/local/bin:/opt/custom/bin:$PATH
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@alexellis
alexellis / k8s-pi.md
Last active June 28, 2025 05:44
K8s on Raspbian
@pnarayanan
pnarayanan / MsgFmt
Last active October 29, 2017 09:45
Gist of the change within Message Format to support encryption at rest
To support encryption, Message Format associated with messages now needs to store the encryption key.
Since we need to encrypt/decrypt both the User Metadata and the Blob payload, we have two choices:
a) Duplicate the key within both the User Metadata subrecord and Blob subrecord. This is the least
invasive change and has some merits, but has the burden of duplication of keys.
b) Create a new Blob Encryption Key record and store the key just once.
We decided to go with the second approach that avoids duplication and lends itself better to potential
use cases such as key replacements.
@jart
jart / blakefiler.py
Last active October 2, 2024 13:29
Turns bazel query --output=build //tensorflow:libtensorflow_framework.so into isomorphic Makefile
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@yangminzhu
yangminzhu / local RBAC
Last active August 29, 2018 12:19
Test the local RBAC with static config
# Start Envoy with RBAC filter, you need to use the latest upstream envoy with RBAC filter support.
# Note: the static config include a RBAC rule that only allows access to path "/allow"
$ envoy -l debug -c sample_rbac_config.yaml
# Start a test server listening on 10001
$ while true; do echo -e "HTTP/1.1 200 OK\n\n Welcome" | nc -l 127.0.0.1 10001 -q 1; done
# First let's try to access a path that is not included in the RBAC policy
# Check the response is: "RBAC: access denied". This means the request was denied by RBAC filter and didn't access the test server
$ curl http://127.0.0.1:9999/hello
@jperkin
jperkin / xopen-stdc-extensions.md
Last active March 5, 2025 15:38
SunOS, _XOPEN_SOURCE, _POSIX_C_SOURCE, C99, etc...

How To Correctly Set _XOPEN_SOURCE and __EXTENSIONS__

This is a work-in-progress, but aims to help navigate the murky waters of setting _XOPEN_SOURCE in such a way that it is compatible across C standards on SunOS systems.

Introduction

A table is worth a thousand words. Defines used in a default compilation environment (i.e. no -std=.. specified):

@jperkin
jperkin / trunk-images.md
Last active May 18, 2019 16:02
Test pkgsrc trunk bootstraps and images

pkgsrc trunk packages and images

Now that pkgin has refresh support and the macOS trunk builds have proven that a rolling trunk release works well, I am happy to make SmartOS/illumos trunk packages and images available again for testing.

These are rolling builds of pkgsrc trunk every day (or so), providing the latest packages without having to upgrade across quarterly releases. Just install once then pkgin full-upgrade to keep up-to-date.

This is primarily of interest to:

  • Users who just want the latest software.
  • Users who don't want to bother with having to upgrade releases every quarter.
@dyusupov
dyusupov / docker-compose.yml
Last active August 10, 2021 05:49
single-node docker-compose file
version: '2.4'
services:
target:
privileged: true
network_mode: "host"
ipc: "host"
restart: always
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/edgefs/var/run:/opt/nedge/var/run:z'
@cb372
cb372 / riscv.md
Last active June 29, 2025 12:17
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.