A Pen by Matt Daniel Brown on CodePen.
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
#!/bin/sh | |
# Check if running as root | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
token=`cat /System/Applications/Mail.app/Contents/Info.plist | grep -A1 "PluginCompatibilityUUID" | grep string | sed 's/<string>//' | sed 's/<\/string>//'` | |
path="/Library/Mail/Bundles/AltPlugin.mailbundle/Contents/Info.plist" |
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
# System Preferences -> Accessibility -> Display -> Reduce motion | |
tell application "Messages" to activate | |
tell application "Messages" | |
set chatCount to (count of chats) | |
end tell | |
tell application "System Events" | |
tell process "Messages" |
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
{ | |
const ratioConfig = (x, y) => ({ | |
x, | |
y, | |
ratio: x / y | |
}) | |
const commonRatio = [ratioConfig(1, 1), ratioConfig(4, 3), ratioConfig(16, 9), ratioConfig(16, 10)]; | |
const getRatioConfig = (x, y) => { |
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
const isApproximateInteger = value => { | |
const min = Math.floor(value); | |
const max = Math.ceil(value); | |
return value - min <= 0.01 || max - value <= 0.01; | |
}; | |
const MAX_TRY = 120; | |
const computeToRatio = (width, height) => { |
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
import UIKit | |
import PlaygroundSupport | |
/// Simple sample diffable table view to demonstrate using diffable data sources. Approximately 33% of the time, it should show "bad weather" UI instead of apples and oranges | |
final class DiffableTableViewController : UIViewController { | |
var tableView: UITableView! | |
enum Section: String, CaseIterable, Hashable { | |
case apples = "Apples" |
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
#!/bin/sh | |
printf '\033[8;60;172t' | |
clear | |
LocalScriptVer="v1.0.5" | |
RemoteScriptVer="" | |
RemoteScriptPath="https://raw.githubusercontent.com/crazybirdy/MBR-Manual-Method/master/Q6-DownloadFullApp" | |
LocateScriptPath="$HOME/Desktop/" | |
ScriptName="installScript_110fullapp" |
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
// ==UserScript== | |
// @name 彩云小译 | |
// @namespace https://github.com/yandd | |
// @version 1.1.0 | |
// @icon https://www.caiyunapp.com/favicon.ico | |
// @description 彩云小译 提供中英对照翻译 | |
// @author yandd <https://github.com/yandd> | |
// @supportURL https://github.com/yandd | |
// @match *://*/* | |
// @run-at document-end |
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
import Foundation | |
// JSON response converted to Data | |
let response = """ | |
{ | |
"name": "Kilo Loco", | |
"pets": { | |
"0": { | |
"name": "Doggo" | |
}, |
Some might be outdated.
Taken from (404 as of today): https://macosxautomation.com/system-prefs-links.html
$ open "x-apple.systempreferences:com.apple.preference.security?General"
NewerOlder