Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

from BeautifulSoup import BeautifulSoup as Soup
import urllib
raw_page = urllib.urlopen('http://www.sfrandonneurs.org/home.htm')
soup = Soup(raw_page)
class MarkdownTable:
@staticmethod

Last updated: 2014-12-25

mdfind commands

Find all the file types in a given directory

mdfind -attr kMDItemContentType "kMDItemContentType == '*'" -onlyin . | awk -F"kMDItemContentType =" '{print $2}' | sort | uniq -c | sort -r

Get Last 5 Files Added in Dropbox Folders

import feedparser
import time
import datetime
from dateutil import tz
import re
import httplib
import urllib
DROPBOX_PERSONAL_FEED = ''
DROPBOX_WORK_FEED = ''
import feedparser
import time
import datetime
from dateutil import tz
import re
import httplib
import urllib
DROPBOX_PERSONAL_FEED = ''
DROPBOX_WORK_FEED = ''
import feedparser
import time
import datetime
from dateutil import tz
import re
import httplib
import urllib
DROPBOX_PERSONAL_FEED = ''
DROPBOX_WORK_FEED = ''

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@rjames86
rjames86 / decode_text.md
Created March 2, 2014 20:29
Actions for Launch Center Pro on iOS

Decode text from the clipboard

launch://clipboard/convert?format=urldecode
@rjames86
rjames86 / Travel_Notices.py
Created January 19, 2014 20:50
Travel_Notices
import console
import sys
import webbrowser
import urllib
base = "launchpro-messaging://"
to = "?to="
xcb = 'x-callback-url/'
body = "&body="
success = '&x-success='
@rjames86
rjames86 / Browser from Clipboard.py
Created January 19, 2014 20:49
Browser from Clipboard
import clipboard
import webbrowser
cb_contents = clipboard.get()
if cb_contents.startswith('http'):
webbrowser.open('safari-' + cb_contents)