Skip to content

Instantly share code, notes, and snippets.

View TheMetaphysicalCrook's full-sized avatar

The.Metaphysical.Crook TheMetaphysicalCrook

View GitHub Profile
@TheMetaphysicalCrook
TheMetaphysicalCrook / disable.sh
Created January 27, 2024 16:44 — forked from Mathijs-Bakker/disable.sh
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true
@TheMetaphysicalCrook
TheMetaphysicalCrook / Selection.py
Created September 21, 2020 01:17 — forked from viticci/Selection.py
Selection.py
# coding: utf-8
import sys
import html2text
import clipboard
import webbrowser
webpage = clipboard.get()
text = sys.argv[1]
@TheMetaphysicalCrook
TheMetaphysicalCrook / shortcut-preview.user.js
Created June 30, 2020 19:58 — forked from atnbueno/shortcut-preview.user.js
Add "Preview" button to iOS shortcut's iCloud links, linking to preview.scpl.dev (plus cosmetic changes to the last)
// ==UserScript==
// @name shortcut-preview
// @namespace https://www.atnbueno.com/
// @match https://preview.scpl.dev/*
// @match https://www.icloud.com/shortcuts/*
// @version 1.2
// @grant none
// ==/UserScript==
(function () {
@TheMetaphysicalCrook
TheMetaphysicalCrook / instapaper-beeminder.md
Created March 28, 2020 18:14 — forked from aamaras/instapaper-beeminder.md
How to track your Instapaper queue with Beeminder

How to track your Instapaper queue with Beeminder

A step by step guide to tracking your Instapaper reading list using Beeminder. This method can also be used more generally to track many things that spit out an RSS feed.

In short: Instapaper gives you (private) RSS feeds for your Read later folder and your Archive. We give IFTTT these feeds and tell it to send an email to Beeminder whenever either feed updates. We'll send a "+1" when you add an item to your read later folder and a "-1" when you archive an item. Your Beeminder goal will track the total number of articles in your queue.

Ingredients

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

@TheMetaphysicalCrook
TheMetaphysicalCrook / player.js
Created February 4, 2020 15:03
JSBox video player based on AVPlayerViewController
const frameworks = ["AVFoundation", "AVKit"];
frameworks.forEach(name => {
$objc("NSBundle").$bundleWithPath(`/System/Library/Frameworks/${name}.framework`).$load();
});
const gravities = {
resize: "AVLayerVideoGravityResize",
resizeAspect: "AVLayerVideoGravityResizeAspect",
resizeAspectFill: "AVLayerVideoGravityResizeAspectFill",
}
(function() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://xteko.blob.core.windows.net/neo/eruda-loader.js';
document.body.appendChild(script);
})();
completion();
(function(node, maker, setter, getter, identifier, src, element) {
if (node.getElementById(identifier)) return;
element = node[maker + 'NS'] && node.documentElement.namespaceURI;
element = element ? node[maker + 'NS'](element, 'script') : node[maker]('script');
element[setter]('id', identifier);
element[setter]('src', src);
(node[getter]('head')[0] || node[getter]('body')[0]).appendChild(element);
})(document, 'createElement', 'setAttribute', 'getElementsByTagName', 'FirebugLite', 'https://getfirebug.com/firebug-lite.js#startOpened')
completion();
(function() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://xteko.blob.core.windows.net/neo/vconsole-loader.js';
document.body.appendChild(script);
})();
completion();