Skip to content

Instantly share code, notes, and snippets.

@alessio
alessio / libsk-libfido2_BUILD_FROM_OPENSSH.md
Created January 13, 2024 23:54 — forked from thelastlin/libsk-libfido2_BUILD_FROM_OPENSSH.md
Build libsk-libfido2.so from OpenSSH-portable

Tested on macOS Sonoma Developer beta 2 (23A5276g)

Build libsk-libfido2.so

Prerequisite

  1. Download openssh-portable source code, install libcrypto, libfido2;
  2. Configure openssh-portable build system by ./configure # [options].

Apply patch

@alessio
alessio / Homebrew in a multi-user environment.md
Created January 13, 2024 22:13 — forked from claui/Homebrew in a multi-user environment.md
Using Homebrew on macOS in a multi-user environment

I’ve had success using Homebrew in a multi-user environment the following way:

Create a shared Homebrew user

Create a new (non-GUI) user, group and home directory:

sudo /usr/sbin/sysadminctl -addUser brew \
  -fullName 'Homebrew' -admin -home /var/brew \
  -password - -UID 430 \
@alessio
alessio / macapp.go
Created September 26, 2023 22:58 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:

0x24abe08c1e0f1ac3fd4a38ef7e0a9877c12457e1af2724b41984c797fe8bca30

@alessio
alessio / go
Created December 11, 2016 11:13 — forked from mem/go
go wrapper to automatically set GOPATH
#!/bin/sh
get_inode() {
stat -c '%i' "$1"
}
find_go() {
self=`get_inode $(readlink -m "$1")`
local IFS=: