Skip to content

Instantly share code, notes, and snippets.

View pxia's full-sized avatar

Peter Xia pxia

  • Google
  • Sunnyvale, CA
View GitHub Profile

The time-consuming part is not building MPV itself, but the long list of dependencies requiring a rebuild in order to fully satisfy the deployment target version. Setting MACOSX_DEPLOYMENT_TARGET in the immediate environment doesn't always propagate, resulting in target mix-ups and build failures for some dependencies. The only working solution I've found is to enforce within the formulas themselves. The following script adjusts the bulk of this:

#!/bin/sh
path='/path/to/homebrew/Library/Taps/homebrew/homebrew-core/Formula'
for dep in pkg-config makedepend autoconf automake openssl lua@5.1 libpng jpeg libtiff youtube-dl little-cms2 gettext libffi pcre libtool freetype fontconfig cairo pixman graphite2 icu4c harfbuzz glib libogg libvorbis flac libsamplerate libsndfile rubberband theora nasm readline sqlite gdbm xz python@2 python gobject-introspection docutils fribidi texi2html libass ffmpeg mujs mpv
do

sed -i.bu $'s/def install/def install\\n ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.

@jaredmales
jaredmales / rclone-cron.sh
Last active January 8, 2024 01:56
An rclone backup script for cron
#!/bin/bash
##############################################################################
# An rclone backup script by Jared Males (jaredmales@gmail.com)
#
# Copyright (C) 2018 Jared Males <jaredmales@gmail.com>
#
# This script is licensed under the terms of the MIT license.
# https://opensource.org/licenses/MIT
#
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@paulsmith
paulsmith / echo.go
Created January 12, 2011 06:09
A simple echo server testing a few interesting Go language features, goroutines and channels.
// $ 6g echo.go && 6l -o echo echo.6
// $ ./echo
//
// ~ in another terminal ~
//
// $ nc localhost 3540
package main
import (