Skip to content

Instantly share code, notes, and snippets.

View extratone's full-sized avatar
🗿
iOS Keyboard Shortcuts and E D I T O R I A L G I T , BITCH!

David Blue extratone

🗿
iOS Keyboard Shortcuts and E D I T O R I A L G I T , BITCH!
View GitHub Profile
@extratone
extratone / gist:94972516d5f552bc9b00b8d2a4b39905
Created September 25, 2022 07:55 — forked from palmin/gist:14300e8bf529d05e7e53
Get fonts family and font names list on iOS
// List all fonts on iPhone
for (NSString* family in [UIFont familyNames]) {
NSLog(@"Family name: %@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family]) {
NSLog(@" Font name: %@", name);
}
}
@idnovic
idnovic / shellfishwidget.sh
Last active July 16, 2023 23:03
shellfish widget
#!/bin/bash
source .bashrc
loadavg=$(cat /proc/loadavg | awk '{print $2}' | sed 's/[^0-9]*//g')
cpucount=$(sed -n '/ cores/ s/[^0-9]//gp' /proc/cpuinfo | sed '1,1d')
cpu=$(($loadavg/$cpucount))
memtotal=$(sed -n '/^MemTotal:/ s/[^0-9]//gp' /proc/meminfo)
memavail=$(sed -n '/^MemAvailable:/ s/[^0-9]//gp' /proc/meminfo)
mem=$(((($memtotal-$memavail))/($memtotal/100)))
@atnbueno
atnbueno / ipsw2dmg.sh
Created July 31, 2022 10:52
A zsh script to extract the largest DMG from an IPSW to the same folder with the label as name
#!/bin/zsh
# ipsw2dmg.sh by github.com/atnbueno - v2.0.0 (2022-07-31) - License: MIT
# Check if input file exists (with or without an .ipsw extension)
if [ -f "$1" ]; then
INPUT=$(realpath "$1")
else
if [ -f "$1.ipsw" ]; then
INPUT=$(realpath "$1.ipsw")
else
@christophercalm
christophercalm / block-fb-sponsored-tampermonkey.js
Last active July 2, 2022 18:39
Finds all html elements with fbclid in them to block ads.
// ==UserScript==
// @name Remove Facebook Sponsored Elements
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description Remove Facebook Sponsored Elements
// @author You
// @match https://www.facebook.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @run-at document-idle
@SKaplanOfficial
SKaplanOfficial / count_shortcuts.py
Last active September 15, 2023 16:22
Using PyXA to get the number of shortcuts in each shortcuts folder
# Tested with PyXA 0.1.0
import PyXA
app = PyXA.Application("Shortcuts")
folders = app.folders()
# Method 1 - Standard iteration
summary = []
for folder in folders:
folder_name = folder.name
num_shortcuts = len(folder.shortcuts())
@vibhavsinha
vibhavsinha / te-date.js
Last active September 17, 2022 02:27
Textexpander snippet for date formatting with configurable options. Made to run on both text-expander and as node cli for testing.
// Use tab keys to quickly go to OK button
let dateFormat = '%fillpopup:name=dateFormat:default=YYYY-MM-DD:MMM DD, YYYY:DD/MM/YY:MM/DD/YY:none%';
let timeFormat = '%fillpopup:name=timeFormat:HH MM:HH MM SS:default=HH MM ZONE:HH MM SS ZONE:none%';
let hour24 = '%fillpart:name=24 hour format:default=yes%hour24%fillpartend%';
let includeYear = '%fillpart:name=Include year:default=yes%includeYear%fillpartend%';
// keeping these at the top because TextExpander has to show the
// full function code every time.
// This is very long code. Use tab keys to quickly go to ok button.
// Time options have spaces instead of colons because I couldn't
@logic2design
logic2design / Safari - Open specific link on the webpage.applescript
Last active December 8, 2023 22:53
This Applescript will open the first URL link on the page that matches a search value
@extratone
extratone / zalgo.js
Created January 12, 2022 18:26 — forked from flanger001/zalgo.js
I stole a Zalgo text generator
/* <![CDATA[ */
//============================================================
// ZALGO text script by tchouky
//============================================================
// data set of leet unicode chars
//---------------------------------------------------
//those go UP
var zalgo_up = [
@jasonsnell
jasonsnell / podcast-noter.scpt
Last active October 27, 2022 15:33
Podcast Noter AppleScript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
# Sample Keyboard Maestro macros at
# <https://sixcolors.com/wp-content/uploads/2022/01/Podcast-Noter-Macros.kmmacros.zip>
on run argv
try
set theNote to (item 1 of argv)
on error
@insidegui
insidegui / lsremovearchives.sh
Created December 21, 2021 18:28
Remove Xcode app archives from macOS LaunchServices database
#!/bin/bash
# Recursivelly removes all apps from your Xcode archives from the LaunchServices database, preventing them from being used for widgets, launch at login, etc.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f -u $HOME/Library/Developer/Xcode/Archives