This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# just for macOS | |
# | |
# The default options for installing ffmpeg and mpv via brew do not include the activation of libplacebo. | |
# As a result, when playing videos in Dolby Vision, the color mapping is not accurate. To resolve this issue, | |
# a script is used to compile ffmpeg with libplacebo activated, followed by the building of mpv. | |
# Extra: build mpv bundle, with jxl | |
if [ "$(uname -s)" != "Darwin" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- When using the version under development, the image sometimes | |
-- freezes during seek. Restarting mpv cures it, but it is | |
-- troublesome, so I wrote a script to solve the problem. | |
local function restart_mpv() | |
mp.command("quit-watch-later") | |
local cmds = {"run", "mpv"} | |
-- local opts = mp.get_property_native("property-list") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- For the latest version: | |
-- https://gist.github.com/parterburn/e832b9090ee35eb830529de8bd978b82 | |
-- Set this property to true to always open in a new window | |
property open_in_new_window : false | |
-- Set this property to false to reuse the current tab | |
property open_in_new_tab : true | |
-- Handlers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Builds mpv & mpv.app on Apple silicon Macs. | |
# Run this script from the root directory of the mpv repo. | |
# if anything fails, gtfo | |
set -ex | |
meson setup build | |
meson compile -C build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" | |
repeat with tabItem in tabs of window 1 | |
set link to URL of tabItem | |
tell application id "cc.anybox.Anybox" | |
save link | |
end tell | |
end repeat | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LICENSE | |
// ======= | |
// Copyright (c) 2017-2019 Advanced Micro Devices, Inc. All rights reserved. | |
// ------- | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
// Software is furnished to do so, subject to the following conditions: | |
// ------- | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage: | |
# - Install `tesseract` with `brew install tesseract` | |
# - In BetterTouchTool, create a trigger of your choice. | |
# (I recommend a Keyboard Shortcut with Cmd+Shift 6) | |
# - Add an Execute Shell Script / Task action | |
# - Paste this script. | |
# NOTE: You'll need to authorize BTT to the Screen Recording permission in Security and Privacy at System Preferences |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------- | |
-- #example ytdl_preload.conf | |
-- # make sure lines do not have trailing whitespace | |
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace | |
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider | |
-- #temp=R:\ytdltest | |
-- #ytdl_opt1=-r 50k | |
-- #ytdl_opt2=-N 5 | |
-- #ytdl_opt#=etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Boot into Recovery mode (by pressing CMD+R while boot macOS) | |
2. Unmount APFS volumes automaticaly mounted by Recovery (where /dev/disk2 is your APFS container) | |
$ diskutil unmountDisk /dev/disk2 | |
Unmount of all volumes on disk2 was successful | |
3. Unlock APFS volumes (in case FileVault enabled for this volume) | |
$ diskutil apfs unlockVolume /dev/disk2s1 -nomount |
NewerOlder