Skip to content

Instantly share code, notes, and snippets.

@astreknet
astreknet / OpenBSD_on_Apple_M2_QEMU.md
Last active October 25, 2024 21:27
OpenBSD on Apple M2 with QEMU

OpenBSD on Apple M2 with QEMU

Minimalist installation of OpenBSD on the Apple M2 using QEMU

Ingredients

Installation

  1. install QEMU with Homebrew brew install qemu, also possible with MacPorts
  2. Write a script with execute permissions chmod +x qemu_aarch64_install_openbsd.sh for installing the image.
@geekodour
geekodour / c.md
Last active January 13, 2025 04:04
security and privacy guides backup
@blacktm
blacktm / package.rb
Created November 27, 2018 02:31
Create macOS app bundle from an executable file
# Run this script using `ruby package.rb` with an executable named `app`
# in a `build/` directory.
# Build an app bundle for macOS
def build_macos_package
require 'fileutils'
info_plist = %(
<?xml version="1.0" encoding="UTF-8"?>
@mholt
mholt / macapp.go
Last active April 15, 2025 20:34
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:
@wofeiwo
wofeiwo / gist:3634357
Created September 5, 2012 10:00
Golang daemonize
/* ivan(a.t)mysqlab.net */
package main
import (
"syscall"
"os"
"log"
)
func daemon(nochdir, noclose int) int {