Skip to content

Instantly share code, notes, and snippets.

@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"?>
@blacktm
blacktm / rename_media.rb
Created February 2, 2020 02:56
A Ruby script to rename HEIC and MOV files with date taken in Exif data on macOS
# Requires exiftool, install using Homebrew:
# brew install exiftool
require 'time'
Dir.glob('*.{heic,mov}') do |file|
puts "Renaming #{file}"
case File.extname(file)
when '.heic'