Skip to content

Instantly share code, notes, and snippets.

@ryanlaner
ryanlaner / gist:02b10ddbc68251cd9f1c
Created March 18, 2015 06:27
Apple Reminders.app -- Delete Completed Reminders
set the theList to {"Reminders", "Groceries"} -- Edit/Add all Reminder lists to remove completed items from
repeat with eachList in theList
tell application "Reminders"
-- Loop thru reminders in the targeted reminder.app list
tell list eachList
set theTasks to every reminder
repeat with theTask in theTasks
if theTask is completed then
@dreadatour
dreadatour / gist:7475747
Created November 14, 2013 22:51
Remove default Sublime Text 3 snippets
# Sublime Text 3 languages list:
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/
# Remove all default Sublime Text 3 snippets for Python language
export ST3_LANG="Python"
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done
unset ST3_LANG
@brettkelly
brettkelly / oauth_example.py
Created February 26, 2013 18:55
Authenticate with the Evernote Cloud API using OAuth and Python
# Python OAuth example
import evernote.edam.userstore.constants as UserStoreConstants
import evernote.edam.type.ttypes as Types
from evernote.api.client import EvernoteClient
##
# Helper function to turn query string parameters into a
# Python dictionary
##
@kohenkatz
kohenkatz / git-completion.tcsh
Created April 5, 2012 18:30
Source this file in your .tcshrc to get git command completion. Original source is http://gtirtha.wordpress.com/2010/05/14/git-autocomplete/ but WordPress's WSYIWYG editor messed it up and I cleaned it up.
# Source this script in tcsh to setup shell completions
# for git. Completions are activated by typing or Control-D
# in the shell after entering a partial command.
#
# Usage:
# source git-completion.tcsh (e.g. in ~/.cshrc)
#
# Supported completions:
# git (lists git commands)
# git help (lists git commands)