Skip to content

Instantly share code, notes, and snippets.

@YOU54F
YOU54F / README.md
Created May 17, 2024 20:13
.NET 8 error on MacOS Apple Silicon with SIP disabled

Related to closed issue dotnet/runtime#96247

❯ brew install dotnet-sdk8-0-100
==> Installing Cask dotnet-sdk8-0-100
==> Running installer for dotnet-sdk8-0-100 with sudo; the password may be necessary.
Password:
installer: Package name is Microsoft .NET SDK 8.0.101 (arm64)
installer: Upgrading at base path /
installer: The upgrade was successful.
@YOU54F
YOU54F / prlctlman
Created October 4, 2023 14:42
Parallels VM Manager - helps list, snapshot and show details about a machine
#!/bin/bash
name=$(basename $0)
prlctl list --info "${1}" > /dev/null
if [ "$?" -eq 0 ] ; then
os="$1"
id=$(prlctl snapshot-list "${os}" | grep -oE '\*{.*\}' | tr -d '*{}')
action="$2"
@YOU54F
YOU54F / mact-prl
Created October 4, 2023 14:40
Run GitHub Actions projects, locally, using on Parallels Virtual Machines
#!/bin/bash -l
# prlctl-ssh
# ==========
# Parallels Desktop command line utility for open a new SSH connection to a given virtual machine.
# If the virtual machine is stopped or suspended the utility will attempt to respawn it before it attemts to SSH into the machine.
# ## Preconditions
@YOU54F
YOU54F / mact-tart
Last active October 4, 2023 17:03
Run GitHub Actions projects, locally, using on MacOS ARM64 Virtual Machines with Tart
#!/bin/bash
PROJECT=${PWD##*/}
PLATFORM=${PLATFORM:-macos-latest}
WORKFLOW=${WORKFLOW:-test.yml}
IMAGE=${IMAGE:-runner}
SSH_USER=${SSH_USER:-runner}
SSH_PASS=${SSH_PASS:-runner}
# IMAGE=${IMAGE:-ghcr.io/cirruslabs/macos-ventura-xcode:14.3.1}
@YOU54F
YOU54F / quake_macos_iterm2.md
Last active September 15, 2023 11:00
drop-down-terminal-in-macos-with-iterm2

https://blog.mestwin.net/drop-down-terminal-in-macos-with-iterm2/

  1. brew cask install iterm2
  2. Go to Preferences → Keys → Hotkey and check the Show/ hide all windows with a system-wide hotkey checbox and choose your hotkey combination.
  3. Go to Preferences → Profiles → Window tab and set Style to Full-Width Top of Screen and Screen to Screen with Cursor.
  4. Good idea is also to exclude iTerm2 from the Dock and application switcher [⌘+Tab].
    1. Go to Preferences → Appearance and check the Exclude from Dock and ⌘-Tab Switcher.
  5. Go to System Preferences → Users and Groups. Then choose your user and go to Login Items tab. Add new item with [+] button and choose iTerm application from Applications folder.
@YOU54F
YOU54F / vanilla-big-sur-11.0.1.pkr.hcl
Last active October 4, 2023 14:15
big sur packer template
packer {
required_plugins {
tart = {
version = ">= 1.2.0"
source = "github.com/cirruslabs/tart"
}
}
}
source "tart-cli" "tart" {
@YOU54F
YOU54F / test.js
Created September 14, 2023 17:13
pact-js-core - makeConsumerPact
{
"dependencies": {
"@pact-foundation/pact-core": "^14.0.4"
}
}
@YOU54F
YOU54F / README.md
Last active September 14, 2023 17:09
simple pact-js http test with axios & jest
npm install
npm run test
[18:07:03.554] INFO (10914): 0.4.7: pact native library successfully found, and the correct version
2023-09-14T17:07:03.562539Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact - ref = 1, keys = [1]
2023-09-14T17:07:03.563697Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact before - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "consumer-js-v3" }, provider: Provider { name: "provider-js-v3" }, interactions: [], metadata: {"pactRust": Object {"ffi": String("0.4.7")}}, plugin_data: [] }, mock_server_started: false, specification_version: V3 } }
2023-09-14T17:07:03.564578Z TRACE ThreadId(01) pact_ffi::mock_server::handles: with_pact after - ref = 1, inner = RefCell { value: PactHandleInner { pact: V4Pact { consumer: Consumer { name: "consumer-js-v3" }, provider: Provider { name: "provider-js-v3" }, interactions: [], metadata: {"pactRust": Object {"ffi": String("0.4.7")}}, plugin_data: [] }, moc
@YOU54F
YOU54F / Makefile-macos-rund
Last active September 20, 2023 08:53
MacOS Apple Silicon - OCI Darwin containers on & All things virtual machines
all: build_rund build_ctr build_containerd build_buildctl build_buildkitd
build_rund:
cd rund && \
go build -o ../bin/ cmd/containerd-shim-rund-v1.go
build_ctr:
cd containerd && \
go build -o ../bin/ctr cmd/ctr/main.go
@YOU54F
YOU54F / otool_tips.md
Created September 13, 2023 17:03
otool tips and tricks for MACOSX_DEPLOYMENT_TARGET (with rust example)