Skip to content

Instantly share code, notes, and snippets.

@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 {
@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"?>
@geekodour
geekodour / c.md
Last active June 5, 2024 19:09
security and privacy guides backup
@astreknet
astreknet / OpenBSD_on_Apple_M2_QEMU.md
Last active April 11, 2024 08:39
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.