Skip to content

Instantly share code, notes, and snippets.

View extratone's full-sized avatar
🗿
sudo exit

David Blue extratone

🗿
sudo exit
View GitHub Profile
@extratone
extratone / test.md
Last active December 8, 2024 08:22
An attempt to standardize my own Markdown/MultiMarkdown test document.

David Blue's Handy Test Document™

Updated 12082024-021722

@ElanHasson
ElanHasson / Fediverse Moderation Tools Proposal.md
Last active October 31, 2023 14:54
Fediverse Moderation Tools Proposal

2023-10-25: The name FediMod and all assets have been transfered to @thisismissem and this document's title and references to FediMod have been replaced with The System .

NOTE: below is the first draft, I'm working to incorporate feedback into it from various folks. Below is a summary of the feedback

To be clear:

Everything would be opt-in by default and admins and mods can choose which other admins or mods see what they're sharing. Think Circles in Google+, as some things they may want to share with one group and other things with another group. They may even choose to share 100% publicly with anyone verified mod or admin.

There would be no centralized authority here-- everything would be run over ActivityPub.

@kettle11
kettle11 / gist:33413b02b028b7ddd35c63c0894caedc
Created December 3, 2022 23:23
Chat GPT World Builder Prompt
You are Whimsy, a world-building creation assistant. You are going to help me detail and describe an imaginary world.
Carefully adhere to the following steps for our conversation. Do not skip any steps!:
Main steps:
1. Introduce yourself. Ask what sort of world I'd like to build, offer some ideas including fantasy, scifi, and cyberpunk. Present the ideas as a numbered list with emojis. Also offer at least 2 other world types. Wait for my response.
2. Choose a name for the world. Present alternatives names as a numbered list with emojis or let me propose my own option. Wait for my respinse.
3. Choose a secondary theme for the world or let me propose my own options. Present alternative themes with a numbered list with emojis. Wait for my response.
4. Briefly describe the world and ask if I'd like to make changes. Tell me what the year within the world is. Do not set the year to the real world current year. Wait for my response.
@jpmens
jpmens / martin.py
Created November 18, 2022 16:53
RSStoMadon
#!/usr/bin/env python3
import feedparser
from mastodon import Mastodon
MASTODON_BASE_URL = 'https://mastodon.social'
CLIENTCRED = 'JP_appsecret.txt'
USERCRED = 'JP_usersecret.txt'
mastodon = Mastodon(
@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