Skip to content

Instantly share code, notes, and snippets.

@sebietter
sebietter / Upload_Picture.py
Created February 11, 2013 14:07
With this script for Pythonista you can easily upload a picture from iOS to your own webserver.
import webbrowser
import clipboard
import Image, ImageFile
import datetime
import ftplib
import urllib
from io import BytesIO
today = datetime.datetime.now()
image = clipboard.get_image()
@ROldford
ROldford / Parse Start and Due Dates.applescript
Last active February 26, 2024 07:03 — forked from andyferra/Parse Start and Due Dates.applescript
A script to add due and start date support to TaskPaper, forked from the script by andyferra. See http://www.hogbaysoftware.com/wiki/StartAndDueDatesV2 for more information.
(*
Parse Start and Due Dates script
By Ryan Oldford
Based on work by andyferra (https://gist.github.com/andyferra/64842)
change_case taken from http://www.macosxautomation.com/applescript/sbrt/sbrt-06.html
This script is used with TaskPaper to provide better start and due date support, as well as support for repeating tasks.
The script searches for @due and @start tags, converts their values to standard date code values,
then adds the appropriate "diff" tag whose value indicates how far away the due or start date is (negative = past, 0 = today).
Any tasks with a @repeat tag that are done are edited to remove the done tag and have their due tags updated.
@billygoat
billygoat / drafts.js
Last active February 26, 2024 07:03
Drafts Bookmarklet
javascript:(function(){
var w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt="";
tmplt="Title: "+pageTitle+"\nLink: "+pageUri+"\n\n";
if(pageSelectedTxt!="") {
pageSelectedTxt=">%20"+pageSelectedTxt;
pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n");
pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20");
}
w.location.href="drafts://x-callback-url/create/?text="+encodeURIComponent(tmplt+pageSelectedTxt);
})();
@oban89
oban89 / Chrome URL to Reminders
Created April 11, 2013 18:13
Bookmarklets to add he current browser page to Reminders app via Drafts for iOS.
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'\n')+encodeURIComponent(location.href)+'&action=Reminder&x-success=googlechrome://';
@omz
omz / ShortURL.py
Created May 17, 2013 04:17
ShortURL
# Simple URL shortener using is.gd
#
# Save this script as 'ShortURL' in Pythonista and add the
# bookmarklet below to Safari. The result is copied to the clipboard.
# Bookmarklet:
# javascript:window.location.href='pythonista://ShortURL?action=run&argv='+encodeURIComponent(window.location.href);
import clipboard
import re
@sgerin
sgerin / ios_icons
Created August 19, 2013 03:18
Get iOS icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script: http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Gets the 1024px version of an app icon and applies a rounded mask. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# You may find odd result: try searching for both device categories.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):
@Cuboctaedro
Cuboctaedro / extend.php
Created November 20, 2013 13:32
An extension of Kirbytext for creating a custom "figure" tag for images with complex captions.
<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
$this->addTags('figure');
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@prenagha
prenagha / Copy to iPhone.scpt
Last active February 26, 2024 07:02
Launchbar integration applescript for command-c http://danilo.to/command-c/
--
-- Source: Padraic Renaghan prenagha@renaghan.com https://gist.github.com/prenagha/8372844
--
-- launchbar integration applescript for command-c
-- http://danilo.to/command-c/
--
-- set the variable "theDevice" below as needed to the device name you want to send to
-- Put script in Launchbar actions folder
-- ~/Library/Application Support/Launchbar/Actions
--