- Pastebot
- GIF Brewery
- Slack
- Keynote/Pages/Numbers
- 1Password
- OmniFocus 3
- Airmail 3
- iA Writer
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
<?php | |
define( 'INDENT', ' ' ); | |
$files = shell_exec( | |
'git -C ' . escapeshellarg( __DIR__ ) . | |
' ls-tree --name-only -r HEAD' | |
); | |
if ( !$files ) { |
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
<?php | |
$startupUrls = [ | |
'enwiki-canonical' => 'https://en.wikipedia.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector', | |
'enwiki-mobile' => 'https://en.m.wikipedia.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=minerva&target=mobile', | |
]; | |
define( 'STARTUPREG_JSON_START', 'mw.loader.register([' ); | |
define( 'STARTUPREG_JSON_START_OFFSET', 'mw.loader.register(' ); | |
define( 'STARTUPREG_JSON_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
const csvToJSON = (csv) => { | |
const getcsvdata = (csv) => { | |
const csvRegex = /,(?=(?:(?:[^"]*"){2})*[^"]*$)/; | |
const trimQuotes = /^"|"$/g; | |
csv = csv.split(csvRegex).map( | |
h => h.trim().replace(trimQuotes, '') | |
); | |
return csv; | |
} | |
let lines = csv.split('\n'); |
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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
-- Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window) | |
-- Much more elegant version: Leon Cowle (https://github.com/leoncowle) | |
tell application "Safari" | |
(* | |
`tab` properties: | |
index |
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/python3 | |
# | |
# Convert an Apple iTunes Music Library.xml file into a set of .m3u playlists. | |
# | |
# Copyright 2023 Timo Tijhof <https://timotijhof.net> | |
# Copyright 2006 Mark Huang <[email protected]> | |
# | |
# SPDX-License-Identifier:: GPL-2.0 <https://opensource.org/licenses/GPL-2.0> | |
# | |
# Changelog: |
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
/** | |
* Unique sets in JavaScript | |
* | |
* Inspired by https://fosstodon.org/@[email protected]/109354031141521705 | |
* | |
* Author: Timo Tijhof (2022). | |
* License: Public domain. | |
*/ | |
const NAMES = [ |
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
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
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 MAX = 100 * 1000 * 1000; // 100 million | |
function powself(number) { | |
if (number === 0) { | |
return NaN; // matt does not like zero. | |
} else { | |
return Math.pow(number, number); | |
} | |
} |
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
/*! Requires Node 12.5+ | License: Public domain. */ | |
const cluster = require('cluster'); | |
const WORK_TOTAL = 10_000_000; | |
const WORK_MILESTONE = 1_000_000; | |
const WORK_ASSIGN_CHUNK = 100_000; | |
const WORK_RESP_CHUNK = 1_000; | |
const ALGO = 'md5'; |
NewerOlder