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 / tabs2md.rb
Created January 29, 2023 07:37 — forked from ttscoff/tabs2md.rb
Convert indented text lists to Markdown outlines
#!/usr/bin/env ruby
# tabs2md
# Brett Terpstra 2012
#
# Convert indented text to Markdown
#
# Great for apps that can copy out indented outlines but not OPML
# For basic outlines (mind maps) to Markdown, faster than OPML
#
# Indents can be tabs or 4 spaces

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.

I want whatever FediMod ends up as to be to be ethical, designed and built with empathy and equity in mind.

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.
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@extratone
extratone / Flat UI Colors.clr
Created December 8, 2022 16:02 — forked from chsh/Flat UI Colors.clr
Some color pallets with Apple Color List (.clr) format
@extratone
extratone / Text Substitutions plist to csv.py
Created November 24, 2022 22:42 — forked from cad0p/Text Substitutions plist to csv.py
How to convert mac text substitutions from plist to csv for export to apps like text expander and atext
with open('./TextSubstitutions.plist', 'rb') as _plist:
with open('./TextSubstitutions.csv', 'w') as _csv:
plistfile = plistlib.load(_plist)
csvfile = csv.DictWriter(_csv, fieldnames=['shortcut', 'phrase'])
csvfile.writeheader()
for data in plistfile:
csvfile.writerow(data)
@extratone
extratone / shellista.py
Created November 12, 2022 16:56 — forked from pudquick/shellista.py
Advanced shell for Pythonista
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# Credits
#
# The python code here was written by pudquick@github
#
# License
#
# This code is released under a standard MIT license.
#
@extratone
extratone / shellista.py
Created November 12, 2022 16:56 — forked from pudquick/shellista.py
Advanced shell for Pythonista
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# Credits
#
# The python code here was written by pudquick@github
#
# License
#
# This code is released under a standard MIT license.
#
@extratone
extratone / Get Github Library.py
Created November 5, 2022 10:40 — forked from mmurdoch/Get Github Library.py
Download github library for Pythonista.
# Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil'
# within Pythonista as part of installation. It will also overwrite files in directories
# named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check
# that you have not created any Folders with these names before running this script as
# any files inside them will be irretrievably lost.
import os
import urllib2
import tarfile
import shutil
import traceback
@extratone
extratone / MicroBlogger.py
Created November 5, 2022 10:37 — forked from jbwhaley/MicroBlogger.py
This script facilitates posting to Micro.blog on iOS with Drafts (using Pythonista).
import requests
import sys
import webbrowser
# Replace the 'API_KEY' value below with your API key;
# get one at https://micro.blog/account
API_KEY = "XXXXXXXXXXXXXXXXXXX"
HEADER_VALUE = "Bearer " + API_KEY