This file contains hidden or 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/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister /Library/QuickLook/QuickNFO.qlgenerator | |
1. If that doesn't work, create a dummy script application using Script Editor and copy `UTExportedTypeDeclarations` from QuickNFO.qlgenerator/Contents/Info.plist to this dummy app's Info.plist | |
2. lsregister RegisterUTI-NFO.app |
This file contains hidden or 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 Redirect to teddit | |
// @description Automatically redirect from Reddit to Teddit | |
// @match https://old.reddit.com/* | |
// @match https://www.reddit.com/* | |
// @match https://reddit.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
This file contains hidden or 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 Redirect to nitter | |
// @description Automatically redirect from twitter to nitter | |
// @match https://mobile.twitter.com/* | |
// @match https://twitter.com/* | |
// @grant none | |
// @inject-into content | |
// @run-at document-start | |
// ==/UserScript== |
This file contains hidden or 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
SwiftPM builds don't pass -dead_strip to the linker by default, | |
you might want to pass -Xlinker -dead_strip for release builds | |
if you care about binary size |
This file contains hidden or 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
Preview on macOS 10.14.6 Mojave can remove PDF owner password |
This file contains hidden or 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
// 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 |
This file contains hidden or 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
/* | |
Written By Pan ZhenPeng(@peterpan980927) of Alibaba Security Pandora Lab | |
use it on macOS: cc poc.c -o poc while True; do ./poc ; done | |
*/ | |
#include <errno.h> | |
#include <signal.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains hidden or 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/sandbox-exec | |
-p | |
'(version 1) (allow default) (deny network-outbound (remote ip)) (allow network-outbound (remote ip "localhost:*"))' | |
/Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer/usr/share/xcs/Node/bin/node | |
/Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer/usr/share/xcs/xcsd/worker.js |
This file contains hidden or 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
swift build --configuration release --disable-sandbox |