Skip to content

Instantly share code, notes, and snippets.

View newdigate's full-sized avatar

Nic Newdigate newdigate

View GitHub Profile
@newdigate
newdigate / README.MD
Last active January 27, 2024 13:50
Xcode 15 Fucks your /usr/local/lib dynamic library loading
install_name_tool -id /usr/local/lib/libpact_ffi.dylib /usr/local/lib/libpact_ffi.dylib

from pact-go-issue

I was able to resolve it locally by:

  • either ensure DYLD_FALLBACK_LIBRARY_PATH is set to /usr/local/lib - tricky to do for go test, since it requires using -exec flag, as described here - https://forum.golangbridge.org/t/go-test-with-cgo-on-macos-and-dyld-library-path/32274/2
  • or calling install_name_tool -id /usr/local/lib/libpact_ffi.dylib /usr/local/lib/libpact_ffi.dylib - now when linking to this lib, the resulting binary would link to a full path, rather than just the file name, removing the need to search in fallback dir

environment variables useful for dynamic library loading

@newdigate
newdigate / README.MD
Created November 28, 2023 20:51
teensy - psram and sd card playing using AudioPlayMemory and custom loader
  • must be MONO .RAW 44100 PCM signed 16bit int
  • much more stable than teensy variable playback, but no pitch control for now
@newdigate
newdigate / gist:7c2912cf665aafe23fa842f43b1446b8
Created October 8, 2023 19:58
run nuget server locally.sh
docker run --detach=true \
--publish 5000:8123 \
--env NUGET_API_KEY=1234 \
--volume /Users/nicholasnewdigate/Development/nuget-server:/var/www/db \
--volume /Users/nicholasnewdigate/.nuget/packages:/var/www/packagefiles \
--name nuget-server \
sunside/simple-nuget-server
@newdigate
newdigate / gist:1f1591ade9514679d4f6803bd6340b22
Created October 7, 2023 12:00
skaffold netcore debugger fix: debug-helpers-registry registry.hub.docker.com/nicnewdigate
skaffold config set --global debug-helpers-registry registry.hub.docker.com/nicnewdigate
@newdigate
newdigate / README.md
Last active February 11, 2022 10:35
install cert in kube.md
> export KUBECONFIG=$(PWD)/kubeconfig
> kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.yaml
> helm install webhook-civo https://storage.googleapis.com/charts.okteto.com/cert-manager-webhook-civo-0.2.0.tgz --namespace=cert-manager
> kubectl create secret generic civo-dns --namespace=cert-manager --from-literal=key=<your apikey>
...
> kubectl get certificate wildcard-certificate --namespace=cert-manager

@newdigate
newdigate / minikube ssh -- docker system prune.sh
Created January 9, 2022 13:21
minikube ssh -- docker system prune
minikube ssh -- docker system prune
@newdigate
newdigate / kube-shell-exec.sh
Created January 9, 2022 11:55
kubectl exec --stdin --tty shell-demo -- /bin/bash
kubectl exec --stdin --tty shell-demo -- /bin/bash
@newdigate
newdigate / minikube-mnt-prom-config.sh
Last active January 9, 2022 15:07
minikube mount prometheus.yml
minikube mount $(PWD):/opt/bitnami/prometheus/conf/
@newdigate
newdigate / remove-type-inference.cs
Last active December 28, 2021 15:33
c sharp - c# - remove type inference using roslyn and/or msbuild
using System.Reflection;
using Microsoft.Build.Locator;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.MSBuild;
using Xunit;
namespace type_deinference;
public interface ITypeDeInference {