This file contains hidden or 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 python | |
# Aleksandr Pasechnik | |
# 2014-04-16 | |
# Reads through the Safari Reading List for urls containing youtube.com | |
# Presents a reverse numbered list of the item titles | |
# Opens the selected item in Google Chrome | |
# Because Safari is currently introducing stutters into all youtube videos | |
import os |
This file contains hidden or 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 python | |
# Aleksandr Pasechnik | |
# Looks through the Day One journal and finds the latest entry that starts with | |
# the "Entry Start Text" provided on the command line. The script then asks for | |
# input, reading lines until it comes to one that contains just a single full | |
# stop "." . The script asks for confirmation and appends a new line followed | |
# by the entered text to the end of the entry. | |
# | |
# NOTE: the user is responsible for creating new entries as necessary, |
This file contains hidden or 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
# views.py | |
# Aleksandr Pasechnik | |
# | |
# A Django views.py function which bridges Piwik and StatusBoard | |
# | |
# Django: https://www.djangoproject.com | |
# Piwik: http://piwik.org | |
# StatusBoard: http://panic.com/statusboard/ | |
# PiwikAPI: https://github.com/piwik/piwik-python-api | |
# |
This file contains hidden or 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
# generate_gif.py | |
# Aleksandr Pasechnik | |
# | |
# Creates an animated gif out of the photos found in a Day One journal | |
# based the first line of the entry ('Daily self portrai' in my case). | |
# Animated gifs are generated using imagemagick | |
import os | |
import plistlib | |
import subprocess |
This file contains hidden or 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
# update_timezones.py | |
# Aleksandr Pasechnik | |
# | |
# Goes through the Day One jounal and sets the Time Zone of each entry that | |
# doesn't already have one to the value of the *timezone* variable. Makes a | |
# backup copy of each entry it modified by adding a '.tzbak' to the filename. | |
# Ignores any entry that already has a '.tzbak' version. | |
# | |
# NOTE: base_dir may need to be adjusted to the correct Journal_dayone location | |
# NOTE: It is probably a good idea to have a full journal backup just in case |
This file contains hidden or 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
#! /bin/sh | |
if [[ `ps -A | grep QuickTime | grep -v grep -c` -eq 1 ]]; then | |
if [[ `osascript -e 'tell app "QuickTime Player" to count documents'` -gt 0 ]]; then | |
t=`osascript -e 'tell app "QuickTime Player" to current time of first document as integer'` | |
d=`osascript -e 'tell app "QuickTime Player" to duration of first document as integer'` | |
cur=`date +%s` | |
end=`echo $cur + $d - $t | bc` | |
date -r $end +%H:%M:%S | |
else |
NewerOlder