Skip to content

Instantly share code, notes, and snippets.

View ChewingPencils's full-sized avatar

Sean Korzdorfer ChewingPencils

View GitHub Profile
@ChewingPencils
ChewingPencils / rename_pinboard_tag.py
Created November 30, 2012 21:51
Rename Pinboard Tag
#!/usr/bin/env python
# A quick and dirty script to rename a pinboard.in tag.
# I'll probably update this become a proper command line app one day
import urllib2
import pinboard
pinuser = ""
pinpasswd = ""
@ChewingPencils
ChewingPencils / current_week_textexpander.applescript
Last active December 11, 2015 10:28
Returns the current week in format: YYYY-MM-DD - YYYY-MM-DD. Start of the week is monday. End of the week is Sunday.
-- Sean Korzdorfer
-- 2013-01-21
-- Fork of benwaldie Current Week Range TextExpander snippet: https://gist.github.com/4583398
set theDate to (current date)
set theStartDate to theDate
repeat until weekday of theStartDate = Monday
set theStartDate to theStartDate - 1 * days
end repeat
set theEndDate to theDate
@ChewingPencils
ChewingPencils / Drafts: Search Tweetbot (No Retweets)
Created January 24, 2013 13:29
-filter:retweet -"RT " lang:en
drafts://x-callback-url/import_action?type=URL&name=Search%20Tweetbox&url=tweetbot%3A%2F%2F%2Fsearch%3Fquery%3D%5B%5Bdraft%5D%5D%2520lang%253Aen%2520-filter%253Aretweet%2520-%2522RT%2520%2522
@ChewingPencils
ChewingPencils / pinbook.js
Last active December 11, 2015 21:48
Pinbook x-callback bookmarklet with selection support for iPad. (Returns back to Safari) If this doesn't work, try this code: http://f.cl.ly/items/230t0j0M2L372d3K103l/ClouDrop%20Feb%204,%202013,%207:18:13%20AM.txt
javascript:(function()%20%7Bwindow.location='pinbook://x-callback-url/add?x-source='+encodeURIComponent(window.location.hostname.replace('www.',''))+'&x-success='+encodeURIComponent(window.location)+'&title='+encodeURIComponent(document.title)+'&description='+window.getSelection()+'&url='+encodeURIComponent(window.location);%7D)();
@ChewingPencils
ChewingPencils / VPPageEventScript
Created January 30, 2013 22:04
VPPageEventScript ... Prints all backlinks to a console window. Easy cut and paste for index pages. (Having to write an sort each page is way to taxing). To install, Create a new page: VPPageEventScript. Paste this in.
/*
The pageWasOpened function is called when a page is opened in a VoodooPad document for viewing.
*/
function pageWasOpened(document, page) {
// print("pageWasOpened: " + page.displayName());
//if (page.displayName() == "Category_Reading_Notes")
if (page.displayName().indexOf("Category_") !== -1)
pageList = listBacklinks(String(page.displayName()), page)
@ChewingPencils
ChewingPencils / taskpaper_drafts_action.txt
Created February 7, 2013 14:46
Drafts action to append an indented task with an indented note
drafts://x-callback-url/import_action?type=dropbox&name=TaskPaper%20with%20Indented%20Note&path=%2FTaskPaper%2F&filenametype=2&filename=filename&ext=txt&writetype=0&template=%09-%20%5B%5Btitle%5D%5D%0A%09%09%5B%5Bbody%5D%5D
@ChewingPencils
ChewingPencils / get_ready_to_go.txt
Created February 8, 2013 15:28
Serial Due action for reminding me to get ready to leave, and when I need to leave for an appointment.
due:///add?title=Get%20Ready%20to%20go%20re%3A%20[prompt]%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20due%3A%2F%2F%2Fadd%3Ftitle%3DLeave%26secslater%3D1200
@ChewingPencils
ChewingPencils / gist:5117677
Last active December 14, 2015 16:48
Drafts URL Action for Get Ready to Go.
due:///add?title=Get%20ready%20to%20go%20re%3A%20[[draft]]%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20due%3A%2F%2F%2Fadd%3Ftitle%3D{{HAUL%20ASS!}}%26secslater%3D1200
@ChewingPencils
ChewingPencils / quote_bits.py
Last active December 14, 2015 19:09
A Drafts app action to create a Quotebook app entry.
# Sean Korzdorfer
# 2013-03-10
# quote_bits.py
#
# Creates and submits a Quotebook app URL.
#
# [Quotebook](http://quotebookapp.com/)
# [Drafts](http://agiletortoise.com/drafts)
# [Pythonista](http://omz-software.com/pythonista/)
#
@ChewingPencils
ChewingPencils / gist:5134571
Last active December 14, 2015 19:09
A Pythonista helper script for a Drafts app action used to create a Quotebook app entry. This is the bare-bones version. For error detection, logging and documentation see: https://gist.github.com/ChewingPencils/5134533
# Sean Korzdorfer
# 2013-03-10
# quote_bits.py
import sys
import urllib
import webbrowser
def main():