A tiny ~150-byte polyfill for Promise.prototype.finally
.
Useful for browsers that support Promise but not the .finally()
method.
npm install finally-polyfill
// ==UserScript== | |
// @name @chaoticvibing Twitter Blue Nerd - twitter.com | |
// @namespace Violentmonkey Scripts | |
// @match *://*.twitter.com/* | |
// @match *://*.x.com/* | |
// @grant none | |
// @version 1.9.2 | |
// @author @chaoticvibing - GH @busybox11 | |
// @description 11/9/2022, 11:45:28 PM | |
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw |
// This is part of the blog post here: https://whistlr.info/2022/abortcontroller-is-your-friend/ | |
// ...and can be used to detect/polyfill the `signal` argument to addEventListener. | |
// | |
// Note that at writing, 86%+ of active browsers already support it: | |
// https://caniuse.com/mdn-api_eventtarget_addeventlistener_options_parameter_options_signal_parameter | |
// ...but that 92% of browsers support `AbortController` and signal. | |
// | |
// So there's 6% of total browsers which will fail silently when adding the `signal` argument. | |
// Eyeballing it, this is mostly Safari 11-15 and Chrome 66-90. These snippets can help with those targets. | |
// |
// Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612) | |
// clang -fmodules -shared -Wall -Os -o libsafariinject.dylib safariinject.m | |
// | |
// If SIP off: | |
// DYLD_INSERT_LIBRARIES=$PWD/libsafariinject.dylib /Applications/Safari.app/Contents/MacOS/Safari | |
// | |
// If SIP on, you can demo this by manually removing Safari's code signing signature, but many | |
// features (eg saved logins) won't be readable by the resigned app: | |
// cp -a /Applications/Safari.app ./ | |
// codesign --remove Safari.app/Contents/MacOS/Safari |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>UnifiedBar</key> | |
<dict> | |
<key>DisclosureRequired</key> | |
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string> | |
<key>Enabled</key> | |
<false/> |
module Entry::TrackerBlocking | |
extend ActiveSupport::Concern | |
included do | |
has_many :blocked_trackers | |
end | |
email_service_blockers = { | |
"ActiveCampaign" => /lt\.php(.*)?l\=open/, | |
"AWeber" => "openrate.aweber.com", |
const { execSync } = require('child_process') | |
const { createHash } = require('crypto') | |
const invertColor = require('invert-color') | |
const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
const hash = createHash('sha256') | |
hash.update(branchName) | |
const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
const invertedColor = invertColor(color, true) |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
// | |
// BottomSheetView.swift | |
// | |
// Created by Majid Jabrayilov | |
// Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
// | |
import SwiftUI | |
fileprivate enum Constants { | |
static let radius: CGFloat = 16 |