Skip to content

Instantly share code, notes, and snippets.

View viticci's full-sized avatar

Federico Viticci viticci

View GitHub Profile
@stephenhowells
stephenhowells / Preferences.json
Created September 12, 2012 00:04
Current Sublime Text 2 Settings
{
"auto_complete": true,
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"caret_style": "smooth",
"color_scheme": "Packages/User/Made of Code.tmTheme",
"default_encoding": "UTF-8",
"default_line_ending": "unix",
"detect_indentation": true,
@seyDoggy
seyDoggy / batch-image-resize.sh
Created November 6, 2012 21:05
Batch image resize with command line sips. Note: Sizes are height then width.
for f in *; do sips -z 193 309 $f; done;
anonymous
anonymous / file_browser.py
Created November 9, 2012 05:09
file_browser
from scene import *
from glob import glob
from time import time
from itertools import chain
import console
import os
files = glob('*')
@gvvaughan
gvvaughan / MD Title Extract.py
Created January 22, 2013 06:13
MD Title Extract
import re
g = re.search ('\[[^\]]*\]\(.*"([^"]*)"\)','[foo](bar.com "Title")')
print (g.group(1))
import requests
CLIENT_KEY=""
EMAIL=""
PASSWORD=""
AUTHORIZE_ENDPOINT="http://feedwrangler.net/api/v2/users/authorize?email=%s&password=%s&client_key=%s" % (EMAIL, PASSWORD, CLIENT_KEY)
authorize = requests.get(AUTHORIZE_ENDPOINT)
access_token = authorize.json()['access_token']
#!/usr/bin/env python3
from os.path import expanduser
from urllib import request
from urllib import parse
import json
import sys
API_URL = "https://feedwrangler.net/api/v2/"
@cormacrelf
cormacrelf / things_parsedate.py
Last active July 25, 2016 00:40
Parse a natural language date and use that as the due date for a new Things task. Depends on https://gist.github.com/4583376
# Date parsing for Things
# by Cormac Relf - cormacrelf.com - @cormacrelf
# depends on parsedatetime
# use the .py files extracted from v0.8.7 from here: https://gist.github.com/4583376
# alternatively:
# download pipista; https://gist.github.com/4116558
# in the plain Pythonista console, type `import pipista`, then `pipista.pypi_download("parsedatetime")`
# download shellista; https://gist.github.com/4139094
# running shellista, enter the following commands, which have been shortened for your convenience:
@drdrang
drdrang / Cleanbar.py
Last active July 6, 2017 20:28
Clean up the statusbar of an iOS screenshot. The time in the statusbar is maintained, but all other graphics are stripped out and replaced with graphics that show full battery and signal strength. The cellular provider is replaced with the Apple logo, . All graphics are built into the script, which works for any Retina iOS device in any orienta…
#!/usr/bin/python
import Image
import base64, zlib
# Jay Parlar convinced me to turn this data structure
# from a dictionary into an object.
class PackedImage(object):
def __init__(self, mode, size, data):
self.mode = mode
{
"actions" : [
{
"class" : "WorkflowActionRequestTextInput",
"parameters" : {
"multiLineOption" : 1,
"title" : "Append to Scratch"
}
},
{
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" : [
{