Skip to content

Instantly share code, notes, and snippets.

@esprengle
esprengle / filedownloader.py
Created June 30, 2019 03:21 — forked from bitoffdev/filedownloader.py
filedownloader.py
# Python file downloader for Pythonista by OMZ Software
# By: EJM Software ---- http://ejm.cloudvent.net
# Source: https://gist.github.com/89edf288a15fde45682a
# *****************************************
# This simple script uses the requests module to download files
# and the ui module to show a progress bar
# You can use this bookmarklet to download files from Safari:
# javascript:window.location='pythonista://filedownloader?action=run&argv='+encodeURIComponent(document.location.href);
import ui, console, clipboard, sys, requests, zipfile
@esprengle
esprengle / Material Theme.itermcolors
Created August 11, 2019 18:15 — forked from Revod/Material Theme.itermcolors
Material Theme For iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Blue Component</key>
<real>0.25882352941176473</real>
@esprengle
esprengle / Quiver_HTML_importer.py
Created October 10, 2019 23:23 — forked from kspeeckaert/Quiver_HTML_importer.py
Quiver HTML importer
import json
import uuid
from pathlib import Path
from urllib.parse import urlparse
from datetime import datetime
import html2text
import requests
from bs4 import BeautifulSoup
@esprengle
esprengle / markdown to quiver.py
Created October 11, 2019 02:22 — forked from bllchmbrs/markdown to quiver.py
Convert Markdown Files to Quiver notes
import argparse
import json
import re
import os
from time import time
parser = argparse.ArgumentParser(description='Convert to Quiver Format')
parser.add_argument("src", help="The Source File You want to Convert")
args = parser.parse_args()
cells = []
@esprengle
esprengle / concat_images.py
Created February 14, 2020 04:03 — forked from njanakiev/concat_images.py
Concat images in a matrix grid with Python and PIL
import os
import random
from PIL import Image, ImageOps
def concat_images(image_paths, size, shape=None):
# Open images and resize them
width, height = size
images = map(Image.open, image_paths)
images = [ImageOps.fit(image, size, Image.ANTIALIAS)
@esprengle
esprengle / install_ipython.py
Created March 27, 2020 04:02 — forked from ColdGrub1384/install_ipython.py
A script for installing IPython on Pyto (11.1.12+)
"""
Installs IPython on Pyto.
Usage: Usage: import requests as r; exec(r.get('https://bit.ly/35iSbM1').content.decode())
"""
from pip import main as pip
import os.path
docs = os.path.expanduser("~/Documents")
@esprengle
esprengle / Args.ipynb
Created May 6, 2020 06:31 — forked from gbishop/Args.ipynb
Allow arguments to be passed to notebooks via URL or command line.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()
@esprengle
esprengle / RightClick.applescript
Created May 26, 2020 22:22 — forked from vitorgalvao/Right Click.applescript
Make right-clicking on OSX accessible via a keyboard shortcut.
(*
Even though a [native solution][1] exists, it still suffers from a big flaw: it right-clicks the place you cursor is, not what you’re selecting. This addresses that limitation.
You can install this as a [Finder Service, and later asign it a keyboard shortcut][2].
[1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os
[2]: http://www.macosxautomation.com/services/learn/tut01/index.html
*)
@esprengle
esprengle / gist:74622ebb36bab3e0f111351002d6d40c
Created June 28, 2020 03:48 — forked from benoitsan/gist:6278485
Export to Devonthink from Prizmo
-- Export to Devonthink without extra OCR within Devonthink (Script written by Benjamin Zeiss)
on run argv
if (count of argv) is greater than 0 then
repeat with theItem in argv
tell application id "com.devon-technologies.thinkpro2" to launch
try
set thePath to theItem as text
tell application id "com.devon-technologies.thinkpro2"
set theRecord to import thePath to incoming group
end tell