Skip to content

Instantly share code, notes, and snippets.

View sebnyberg's full-sized avatar
🇸🇪

Sebastian Nyberg sebnyberg

🇸🇪
View GitHub Profile
@sebnyberg
sebnyberg / bazel-with-custom-ca.md
Last active December 11, 2024 21:02
Bazel with Custom CA on MacOS

Bazel with Zscaler

First install openjdk with brew.

I typically use Nix, but for this setup to work the cacerts bundle must be mutable, which is (for good reason) not supported in Nix. There is a relevant discussion here that I have not had time to look into.

brew install openjdk@23
@sebnyberg
sebnyberg / command-snippets.md
Created December 2, 2024 07:03
Random command snippets

Random command snippets

Git

# search for commits with changes to files with name <pattern>
git log -S<pattern> --stat

 # search for commits with changes containing <pattern>
git log -G
@sebnyberg
sebnyberg / findskus.sh
Created June 20, 2024 19:17
Azure stuff
#!/usr/bin/env bash
#
# findskus.sh - Find SKUs that support disk encryption, ephemeral disk, and
# have at least two availability zones.
#
# Usage: findskus.sh [memoryGB] [location]
#
set -euo pipefail
@sebnyberg
sebnyberg / nixsetup.md
Last active November 25, 2024 20:29
Nix Setup for MacOS + ZScaler

Nix Setup for MacOS + ZScaler

These are my personal notes for estting up Nix with ZScaler.

Export certs as cert bundle

ZScaler eavesdrops on all communication, which is indistinguishable from a MITM attack.

Trust the cert in the KeyChain cert store. Then export the bundle to /etc/ssl/certs/ca-certificates.crt:

@sebnyberg
sebnyberg / README.md
Last active December 25, 2023 18:38
Just some git notes

Git notes

Just a collection of git + magit things that I need to start remembering.

Usual working procedure

git switch -c my-branch

# ... do work
@sebnyberg
sebnyberg / README.md
Last active September 27, 2023 06:42
Mac + Moonlander + EN + SE

EN + SE on the Moonlander

I've been switching back and forth between English and Swedish for programming / chatting since.. forever.

Having bought the ZSA Moonlander, one of the goals was to eliminate switching.

There are two possible routes:

  1. Use a Swedish layout and put EN keys in better positions
  2. Use an English layout and somehow manage to insert åäö
@sebnyberg
sebnyberg / README.md
Last active January 10, 2024 04:57
Emacs 29 MacOS setup
@sebnyberg
sebnyberg / tmp_test.go
Last active June 10, 2023 12:52
Roman To Integer Benchmarks
package main_test
import (
"testing"
)
var res int
func a(x int) int {
return x
@sebnyberg
sebnyberg / main.go
Created March 29, 2023 20:27
ChatGPT module thing
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type VpcArgs struct {
Name string
CidrBlock string
@sebnyberg
sebnyberg / keybase.md
Last active September 9, 2022 10:23
keybase.md

Keybase proof

I hereby claim:

  • I am sebnyberg on github.
  • I am sebnyberg (https://keybase.io/sebnyberg) on keybase.
  • I have a public key whose fingerprint is DF53 5589 DAE0 9ECB 9014 4758 0D00 5B0E C045 DB7C

To claim this, I am signing this object: