Skip to content

Instantly share code, notes, and snippets.

@andycmaj
andycmaj / podman_macos.md
Created June 30, 2023 15:14 — forked from kaaquist/podman_macos.md
Podman with docker-compose on MacOS.

Podman with docker-compose on MacOS.

Podman an alternative to Docker Desktop on MacOS

Getting podman installed and started is super easy.
Just use brew to install it.

> brew install podman

Now since podman uses a VM just like the Docker Client on MacOS we need to initialize that and start it.

@andycmaj
andycmaj / invoke.md
Last active September 19, 2022 19:33
offline stitching
❯ pnpx ts-node stitch.ts
.../Library/pnpm/store/v3/tmp/dlx-88146  | Progress: resolved 1, reused 0, downloaded .../Library/pnpm/store/v3/tmp/dlx-88146  | Progress: resolved 13, reused 13, downloade.../Library/pnpm/store/v3/tmp/dlx-88146  |  +17 ++
.../Library/pnpm/store/v3/tmp/dlx-88146  | Progress: resolved 13, reused 13, downloadePackages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /Users/ac/Library/pnpm/store/v3
  Virtual store is at:             ../../../Library/pnpm/store/v3/tmp/dlx-88146/node_modules/.pnpm
.../Library/pnpm/store/v3/tmp/dlx-88146  | Progress: resolved 13, reused 13, downloade.../Library/pnpm/store/v3/tmp/dlx-88146  | Progress: resolved 17, reused 17, downloade WARN  Issues with peer dependencies found
.
└─┬ ts-node
@andycmaj
andycmaj / readme.md
Last active June 27, 2022 18:54
simple monorepo structure

monorepo tooling is still NX, just way simplified.

Repo Structure

.
├── README.md
├── apps
│   ├── api
│   │   └── Dockerfile
export const problem1 = function (length = 12) {
let result = "";
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
};
image:
repository: quay.io/cortexproject/cortex
tag: v1.6.0
pullPolicy: IfNotPresent
clusterDomain: cluster.local
tags:
blocks-storage-memcached: false
ingress:
enabled: false
annotations:
@andycmaj
andycmaj / README.md
Created May 5, 2022 17:40 — forked from mweibel/README.md
cortex configuration

README

Do not use initial-values.yaml. It's an example for our blog post and does not show values safe to use in production.

asyncapi: '2.0.0'
id: 'urn:andy.io.equities.level1'
info:
title: Level1 Avro API
version: 0.1.1
description: AsyncAPI for Level1 events defined using Avro
defaultContentType: application/json
servers:
$ref: "../servers.yaml"
tags:
@andycmaj
andycmaj / karabiner-elements-remote-desktop.json
Created November 6, 2021 19:04 — forked from DennyWeinberg/rdp.json
Karabiner Elements JSON configuration for Microsoft Remote Desktop
{
"title": "Microsoft Remote Desktop",
"rules": [
{
"description": "Windows Mappings",
"manipulators": [
{
"type": "basic", "description": "Completely disabled the windows key (Startmenu)",
"from": { "key_code": "left_command" },
"to": [ { "key_code": "left_control" } ],
@andycmaj
andycmaj / kubeprod-manifest.jsonnet
Last active November 3, 2021 17:34
kubeprod on digital ocean
// Cluster-specific configuration
(import "./bkpr-v1.8.0/manifests/platforms/platform-do.jsonnet") {
config:: import "kubeprod-autogen.json",
}
@andycmaj
andycmaj / fluentd_nested_json.conf
Created October 12, 2021 00:54
fluentd filter config for parsing nested json log messages in k8s-plugin-enriched entries
# Fixes parsing nested json in the docker json logs
<filter kubernetes.**>
@id filter_parser
@type parser
key_name log
reserve_data false
remove_key_name_field true
# use parent @timestamp if can't parse a time field
replace_invalid_sequence true
reserve_time true