View pinboardToLinks.scpt
View quicknote.js
window.open('data:text/html, %3Chtml%20contenteditable%3E%3Cstyle%3E%2A%7Bfont-size%3A20px%7D%3C%2Fstyle%3E','_blank')
//window.open('data:text/html, <html contenteditable><style>*{font-size:20px}</style>','_blank')
View boos-to-blog.scpt
--mp3s have been downloaded and then uploaded to a folder on the web
--I could not manage to create enclosures on blog posts with AppleScript
global myBlogUsername, myBlogPass, myBlogPass, boonote, mp3uploadfolder, boojson
set myBlogUsername to "USERNAME"
set myBlogPass to "PASSWORD"
set boonote to "<em>This audio file was orginally posted to AudioBoo(m) with the mobile app. It has been downloaded and posted here since audioboom no longer supports free accounts.</em>"
set mp3uploadfolder to "http://johnjohnston.info/exboos/"
set boojson to (read POSIX file "Users/john/Desktop/audioboom/johnjohnston.json")
View downloadboos.scpt
set downloadfolder to "/Users/john/Desktop/audioboom/edutalk/"
--so this next bit could be a loop but doing it manual was not much of a hassle
set pagecount to 9
set tag to "edutalk"
set itemcount to 100
tell application "JSON Helper"
set bURL to "https://api.audioboom.com/tag/" & tag & "/audio_clips?page[items]=" & itemcount & "&page[number]=" & pagecount
set boos to fetch JSON from bURL
set myFile to open for access "Macintosh HD:Users:john:Desktop:audioboom:edutalk_" & pagecount & ".json" with write permission
View postto-micro.blog.scpt
on alfred_script(q)
set myBlogUsername to "USERNAME"
set myBlogPass to "PASSWORD"
set cat to {category:{"Micro"}, kind:{"note"}}
set poststrut to {post_type:"post", post_status:"publish", post_format:"status", post_title:"", post_content:q, terms_names:cat, comment_status:"open"}
tell application "http://example.com/xmlrpc.php"
set myPosts to call xmlrpc {method name:"wp.newPost", parameters:{"1", myBlogUsername, myBlogPass, poststrut}}
return myPosts
end tell
end alfred_script
View micoblog_functions.php
<?php // Opening PHP tag - nothing should be before this, not even whitespace
//Micro.blog//
/*
updated 13-05-2017
this is just the micro.blog stuff I've added to my child theme's function php
View isRetina.scpt
on isRetina()
set ret to (do shell script "system_profiler SPDisplaysDataType | awk '/Retina:/{print $2}'")
if ret is "Yes" then
return true
else
return false
end if
end isRetina
View pum.sh
#!/bin/bash
# set -ex bail if something fails and print lines as they are executed
set -ex
#script to download pile of flickr images and make a movie like the pummelvision service
# example https://vimeo.com/196182638
#needs ffmpeg
#needs sips so a mac I think
#Fill in the param any except the APIKEY can be empty
APIKEY='YOURAPIKEYHERE'
View Sync gh-pages + master branches
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
View pinboardrecent.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Most of this based on a script from http://leancrew.com/all-this/2015/12/homemade-rss-aggregator-followup/
#I added the thumbnailing with webkit2png and cut it down to one feed.
#TODO clean up old images, don't regenerate existing images, spearate css from template
import feedparser
import time
from datetime import datetime, timedelta
import pytz