Skip to content

Instantly share code, notes, and snippets.

View nicolai86's full-sized avatar
🏠
Working from home

Raphael Randschau nicolai86

🏠
Working from home
View GitHub Profile
@nicolai86
nicolai86 / lai-iam-policy-v1.json
Last active January 30, 2023 20:16
Lightning AI BYOC IAM policy - 2022-12-22
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"autoscaling:*",
"cloudwatch:*",
"ec2:*",
"ecr:*",
"eks:*",
@nicolai86
nicolai86 / main.go
Created December 22, 2021 17:05
linter ensuring resources are snake_cased
package main
import (
"fmt"
"github.com/hashicorp/terraform-config-inspect/tfconfig"
"log"
"os"
"strings"
)
package builder
import (
"bytes"
"context"
"fmt"
"os/exec"
"path"
"github.com/hashicorp/waypoint-plugin-sdk/terminal"
package autogrant
import (
"context"
"fmt"
"log"
"strings"
chime "github.com/nicolai86/aws-chime-sdk"
)
kepler1229b@qmk_firmware [master*] # diff -bur keyboards/clueboard/60/ keyboards/crkbdstm/rev1/
Only in keyboards/clueboard/60/: .DS_Store
Only in keyboards/clueboard/60/: 60.c
Only in keyboards/clueboard/60/: 60.h
diff -bur keyboards/clueboard/60/config.h keyboards/crkbdstm/rev1/config.h
--- keyboards/clueboard/60/config.h 2019-01-26 16:22:39.000000000 -0800
+++ keyboards/crkbdstm/rev1/config.h 2019-02-28 13:52:46.000000000 -0800
@@ -1,126 +1,19 @@
-/*
- * Copyright 2017 skully <skullydazed@gmail.com>
@nicolai86
nicolai86 / gofuncs.go
Created December 15, 2017 05:50
osx sleep/ wake notifications in golang
package main
import (
"C"
"log"
"time"
)
//export CanSleep
func CanSleep() C.int {
@nicolai86
nicolai86 / main.tf
Created December 3, 2017 21:05
first run missing output
provider "scaleway" {}
variable "commercial_type" {
default = "C1"
}
variable "architectures" {
default = {
C1 = "arm"
VC1S = "x86_64"
the problem:
a golang binary inside a container inside a vm on osx can't resolve a hostname:
```
dial tcp: lookup "…": no such host
```
switching to the cgo resolver via GODEBUG=netdns=cgo results in the same problem.
the hostname can be found on the VM, confirmed via `dig`
@nicolai86
nicolai86 / config.yml
Last active September 18, 2017 21:41
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- pods
@nicolai86
nicolai86 / reset-scaleway.sh
Created January 13, 2017 22:34
bash script to clear your entire scaleway account. requires curl and jq
#!/usr/bin/env bash
if [ -z "$(which curl)" ]; then
echo please install curl
exit 1
fi
if [ -z "$(which jq)" ]; then
echo please install jq
exit 1