Skip to content

Instantly share code, notes, and snippets.

@YOU54F
YOU54F / otool_tips.md
Created September 13, 2023 17:03
otool tips and tricks for MACOSX_DEPLOYMENT_TARGET (with rust example)
@YOU54F
YOU54F / ruby_packagers.md
Last active March 16, 2026 22:59
State of Ruby packaging / executables - 2023

So you've got a cool app in Ruby, and you want to share it with your friends, but they don't love Ruby as much as you.

What do you do? Package it up along with the Ruby runtime and give it to them. Simple right? Maybe not so.

Thankfully smarter cookies than me, have tackled the problem, here is a map of the current state of play

  • Traveling-ruby
    • revisted for Ruby 2.6.10 -> 3.3.0-preview1 and arm64 MacOS/Windows in this fork
      • PR proposed upstream here
  • Rb2exe revisted to use the updated traveling-ruby releases in this fork
@YOU54F
YOU54F / README.md
Last active May 15, 2024 07:56
Apple Silicon and Virtual Machines: Beating the 2 VM Limit
@YOU54F
YOU54F / simplevm.c
Created September 4, 2023 18:43 — forked from imbushuo/simplevm.c
Demonstrates Hypervisor.Framework usage in Apple Silicon
// simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon
// Based on the work by @zhuowei
// @imbushuo - Nov 2020
// To build:
// Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF
// Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON
// ^ Per @never_released, tested on 11.0.1, idk why
// clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c
// codesign --entitlements simplevm.entitlements --force -s - simplevm
@YOU54F
YOU54F / PACT_PYTHON.md
Created June 15, 2023 13:00
pact provider verification task options/modes
@YOU54F
YOU54F / Dockerfile
Created June 6, 2023 21:17
LinuxBrew linux/arm64 - ruby:2.6.10-alpine - modified installer to find ruby on path
FROM --platform=linux/arm64 ruby:2.6.10-alpine
RUN ruby --version && which ruby
RUN apk add bash curl build-base git gcompat && \
rm -rf /var/lib/apt/lists
# Install homebrew for aarch64 linux
# Uses modified installer script to allow for aarch64
ENV PATH="/usr/local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
# 1. you54f/brew git remote allows successful path lookup on install so you can use a custom ruby version
RUN HOMEBREW_BREW_GIT_REMOTE="https://github.com/you54f/brew" \
# 2. ./install.sh allows for linux-aarch64
@YOU54F
YOU54F / Dockerfile
Created June 6, 2023 21:12
LinuxBrew linux/arm64 - ruby:2.6.10-slim - modified installer to find ruby on path
FROM --platform=linux/arm64 ruby:2.6.10-slim
RUN ruby --version && which ruby
RUN apt-get update && \
apt-get install -y curl build-essential git && \
apt-get clean && rm -rf /var/lib/apt/lists
# Install homebrew for aarch64 linux
# Uses modified installer script to allow for aarch64
ENV PATH="/usr/local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
# 1. you54f/brew git remote allows successful path lookup on install so you can use a custom ruby version
RUN HOMEBREW_BREW_GIT_REMOTE="https://github.com/you54f/brew" \
@YOU54F
YOU54F / install.sh
Last active June 6, 2023 23:42
Traveling Ruby CLI Installer
#!/usr/bin/env sh
set -e
## Tested with https://www.shellcheck.net/
# Usage: (install latest release & latest ruby version)
# $ curl -fsSL https://raw.githubusercontent.com/you54f/traveling-ruby/main/install.sh | sh
# or
# $ wget -q https://raw.githubusercontent.com/you54f/traveling-ruby/main/install.sh -O- | sh
# Options
@YOU54F
YOU54F / upload-prebuild-to-release.sh
Last active October 4, 2023 13:10
Uploads a prebuild to a github release
# !/bin/bash -eu
set -e # This needs to be here for windows bash, which doesn't read the #! line above
set -u
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" # Figure out where the script is running
. "$SCRIPT_DIR"/../lib/robust-bash.sh
# if [[ "$CIRRUS_RELEASE" == "" ]]; then
# echo "Not a release. No need to deploy!"
# exit 0