Skip to content

Instantly share code, notes, and snippets.

View fractaledmind's full-sized avatar

Stephen Margheim fractaledmind

View GitHub Profile
@fractaledmind
fractaledmind / Insert Markdown Links for current Skim page (Custom URL)
Last active December 20, 2015 23:39 — forked from fractaledmind/Insert Markdown Links for current Skim page (DEVONthink URL)
REQUIRED PROGRAMS: -- Skim -- TextMate (I have alternate code for TextEdit as well) This script offers you a dialog box with two options: (1) insert a Markdown formatted Inline Link to the current page of the pdf you are viewing in Skim at your cursor position in TextMate, or (2) insert a Markdown formatted Reference Link to the page. Either lin…
@fractaledmind
fractaledmind / Wikify Evernote: Autolinking to Pre-Existing Notes (for TextMate2)
Last active December 21, 2015 05:39 — forked from fractaledmind/Wikify Evernote: Autolinking to Pre-Existing Notes
// FOR THE FREE TEXTMATE2 APP. // This script searches for matches in the current EN note to pre-existing Wiki notes and links to them. It thus mimics the autolinking functionality of personal wikis, such as Voodoopad. To use, you simply either type up a note or go to an existing note and run the script. The script functions by [1] getting the t…
tell application "Evernote"
try
set Evernote_Selection to selection
if Evernote_Selection = {} then
display dialog "Please select the note to Wikify"
end if
set noteName to (title of item 1 of Evernote_Selection)
set notebookName to (name of notebook of item 1 of Evernote_Selection)
end try
@fractaledmind
fractaledmind / Wikify Evernote: Autolinking to New Notes (for TextMate2)
Last active December 21, 2015 05:39 — forked from fractaledmind/Wikify Evernote: Autolinking to New Notes
// FOR THE FREE TEXTMATE2 APP // This script take the selected note and makes it an Index Page for Wiki-Style sub-pages created in a seperate Notebook that is entitled the same as your Note. It uses WikiWords and [[bracketed]] words as the base for the newly created notes. To use, you simply type up a note and put in WikiWords or a term in [[dou…
tell application "Evernote"
try
set Evernote_Selection to selection
if Evernote_Selection = {} then
display dialog "Please select the note to Wikify"
end if
set noteName to (title of item 1 of Evernote_Selection)
set notebookName to (name of notebook of item 1 of Evernote_Selection)
end try
@fractaledmind
fractaledmind / Wikify Evernote: Autolinking to Pre-Existing Notes (for TextEdit)
Last active December 21, 2015 05:39 — forked from fractaledmind/Wikify Evernote: Autolinking to Pre-Existing Notes
// FOR THE FREE TEXTEDIT APP. // This script searches for matches in the current EN note to pre-existing Wiki notes and links to them. It thus mimics the autolinking functionality of personal wikis, such as Voodoopad. To use, you simply either type up a note or go to an existing note and run the script. The script functions by [1] getting the te…
tell application "Evernote"
try
set Evernote_Selection to selection
if Evernote_Selection = {} then
display dialog "Please select the note to Wikify"
end if
set noteName to (title of item 1 of Evernote_Selection)
set notebookName to (name of notebook of item 1 of Evernote_Selection)
end try
@fractaledmind
fractaledmind / Wikify Evernote: Autolinking to New Notes (for TextEdit)
Last active December 21, 2015 05:39 — forked from fractaledmind/Wikify Evernote: Autolinking to New Notes
// FOR THE FREE TEXTEDIT APP // This script take the selected note and makes it an Index Page for Wiki-Style sub-pages created in a seperate Notebook that is entitled the same as your Note. It uses WikiWords and [[bracketed]] words as the base for the newly created notes. To use, you simply type up a note and put in WikiWords or a term in [[doub…
tell application "Evernote"
try
set Evernote_Selection to selection
if Evernote_Selection = {} then
display dialog "Please select the note to Wikify"
end if
set noteName to (title of item 1 of Evernote_Selection)
set notebookName to (name of notebook of item 1 of Evernote_Selection)
end try
@fractaledmind
fractaledmind / Accept, Reject, Alter CriticMarkup Doc (VERSION 2.0)
Last active December 21, 2015 16:59 — forked from fractaledmind/Accept, Reject, Alter CriticMarkup Doc
I rewrote the entire script from the ground up. Changes: --Script moves sentence by sentence and alters text each time, so that Contextual views become less and less cluttered. --Added Contextual View to see the whole paragraph containing Markup in question. This script takes as input a text with CriticMarkup in it and allows the user to either …
(* ACCEPT/REJECT CRITICMARKUP CHANGES
--Stephen Margheim
--23 July 2013
--open source
--VERSION 2.0
I rewrote the entire script from the ground up.
Changes:
--Script moves sentence by sentence and alters text each time, so that Contextual views become less and less cluttered.
# Banner-style (default)
from Foundation import NSUserNotification, NSUserNotificationCenter
def notify(title, subtitle, text):
notification = NSUserNotification.alloc().init()
notification.setTitle_(str(title))
notification.setSubtitle_(str(subtitle))
notification.setInformativeText_(str(text))
notification.setSoundName_("NSUserNotificationDefaultSoundName")
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):