This file contains 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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: black; icon-glyph: user-md; | |
// just replace the url below with the url if the channel you want to use | |
// image channels only, doesnt supoort text or anything else | |
const channel = 'https://www.are.na/una/color-tx32pz_qsu0' | |
const url = 'https://api.are.na/v2/channels/'+channel.substring(channel.lastIndexOf('/') + 1)+'/contents'; | |
const req = new Request(url) |
This file contains 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
This gist contains a workflow for Editorial, an app for | |
writing plain text and markdown on iOS. | |
To import the workflow, copy the *entire* text of the gist, | |
then open Editorial and create a new workflow. | |
------------ BEGIN WORKFLOW ------------ | |
{ | |
"actions" : [ | |
{ |
This file contains 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
import ui | |
# Mapping based on http://www.upsidedowntext.com/unicode | |
CHARMAP = {'!': '\xc2\xa1', '"': ',,', | |
"'": ',', '&': '\xe2\x85\x8b', | |
')': '(', '(': ')', ',': "'", | |
'.': '\xcb\x99', | |
'1': '\xc6\x96', | |
'0': '0', '3': '\xc6\x90', | |
'2': '\xe1\x84\x85', |
This file contains 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
# Utility functions for setting UI/syntax highlighting theme in Pythonista (1.6 beta) using objc_util. WARNING: This relies on some internals that may change in the future. | |
# When run as a script, it toggles between the default (light) theme and Tomorrow-Dark. | |
from objc_util import * | |
import os | |
import glob | |
def get_theme_names(): | |
res_path = str(ObjCClass('NSBundle').mainBundle().resourcePath()) | |
theme_paths = glob.glob(os.path.join(res_path, 'Themes2/*.json')) |
This file contains 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
# coding: utf-8 | |
''' | |
Basic theme editor for Pythonista 1.6 (beta) | |
WARNING: Use at your own risk! User themes aren't "officially" supported, and | |
this may break in future versions. If you enter invalid JSON or anything else | |
that the app can't deal with, it *will* crash -- your input is not validated | |
in any way. | |
''' |
This file contains 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
# coding: utf-8 | |
# Barcode scanner demo for Pythonista | |
# Based on http://www.infragistics.com/community/blogs/torrey-betts/archive/2013/10/10/scanning-barcodes-with-ios-7-objective-c.aspx | |
from objc_util import * | |
from ctypes import c_void_p | |
import ui | |
import sound | |
found_codes = set() |
This file contains 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/env ruby | |
# frozen_string_literal: true | |
require 'optparse' | |
# Have you ever been adding code to a Markdown post and | |
# wondered what syntax label would give you the right | |
# highlighting for your fenced code block? This script can | |
# take either a file extension or a common name of a language | |
# and let you know what lexers are supported for it, as well |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd"> | |
<en-export export-date="20130730T205637Z" application="Evernote" version="Evernote Mac"> | |
<note> | |
<title>Test Note for Export</title> | |
<content> | |
<. | |
# | |
# Inspired by Brett Terpstra's SearchLink: | |
# http://brettterpstra.com/searchlink-automated-markdown-linking-improved/ | |
import clipboard | |
def google(terms): |
This file contains 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/ruby | |
module Bytes | |
def to_human(n,fmt=false) | |
count = 0 | |
formats = %w(B KB MB GB TB PB EB ZB YB) | |
while (fmt || n >= 1024) && count < 8 | |
n /= 1024.0 |