This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
import sys | |
import webbrowser | |
from dropboxlogin import get_client | |
client = get_client() | |
f = client.get_file('/path/to/Library.txt') | |
books = f.read().split('\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
import webbrowser | |
import console | |
def main(): | |
result = console.alert("Today I Learned", "Choose your path", "reddit", "today", "random") | |
today = date.today().strftime("%B_%d") | |
urls = ["http://www.reddit.com/r/todayilearned", ("http://en.wikipedia.org/wiki/%s" % today), "http://en.wikipedia.org/wiki/Special:Random"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -lt 1 ]; then | |
echo "No items to add" | |
else | |
osascript - "$@" <<END | |
on run argv | |
repeat with i from 1 to (count of argv) | |
try | |
tell application "Reminders" | |
tell list "Shared" | |
make new reminder with properties {name: (item i of argv)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import markdown | |
import requests | |
import webbrowser | |
pinToken = 'Put your Pinboard API token here' | |
pinAPI = 'api.pinboard.in/v1/' | |
pinGet = 'posts/all' | |
pinURL = 'https://' + pinAPI + pinGet + '?auth_token=' + pinToken + '&toread=yes&format=json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, urllib, operator | |
from collections import defaultdict | |
USERNAME = raw_input("Get suggestions for: ") | |
CUTOFF = 3 | |
pattern = re.compile(r'<span class="username"><a href="/\w+">(?P<name>\w+)</a></span>') | |
suggestions = defaultdict(int) | |
def find_followers(user): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set url_list to {} | |
set the date_stamp to ((the current date) as string) | |
set NoteTitle to "URL List from Chrome Tabs on " & the date_stamp | |
tell application "Google Chrome" | |
activate | |
set chromeWindow to window 1 | |
repeat with w in chromeWindow | |
try | |
repeat with t in (tabs of w) | |
set TabTitle to (title of t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android | |
import time | |
from datetime import date, datetime | |
def log_battery_status(droid): | |
"""Log battery percentage""" | |
droid.batteryStartMonitoring() | |
battery = 0 | |
while not battery: | |
battery = droid.batteryGetLevel().result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" to set theURL to URL of current tab of window 1 | |
if theURL contains "some unique part of your URL" then | |
tellapplication "Safari" | |
closecurrent tab ofwindow1 | |
endtell | |
set_private_browsing() | |
else | |
set_private_browsing() | |
tellapplication "Safari" | |
makenew tabinwindow1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Evernote" | |
synchronize | |
set the_Selection to selection | |
set the_Title to title of (item 1 of the_Selection) | |
set the_HTML to HTML content of (item 1 of the_Selection) | |
set the_Text to do shell script "echo " & quoted form of the_HTML & space & "| textutil -convert txt -stdin -stdout" | |
set the_Tags to {} |
NewerOlder