Skip to content

Instantly share code, notes, and snippets.

View troutcolor's full-sized avatar

John Johnston troutcolor

View GitHub Profile
troutcolor / Fargo Flickr Search
Last active August 29, 2015 14:04
Using the currently selected outline text as a tag, searches flicker and adds the first 5 images found below with the html returned.
troutcolor / Fargo My Flickr-menu
Last active August 29, 2015 14:04
Script menu script for Fargo. inserts last 10 flickr photos from user (replace my id for yours) into a series of headlines below current.
My Flickr-medium
var theurl = "";
function(data) {
xmlDoc = $.parseXML(data);
var ii = 0;;
$xml = $(xmlDoc),
$xml.find("entry").each(function() {
if (ii > 10) {
troutcolor / tablinks to clip
Created June 13, 2015 16:46
Safari Tab Links to clipboard, html
troutcolor / Safari Tab links to markdown list
Created June 13, 2015 16:48
create markdown list of Safari tabs
troutcolor / auto-complete-gifs
Last active February 12, 2017 10:35
Makes auto complete google search gifs, needs gifsicle
--needs gifsicle
-- updated for retina screen
set thetext to text returned of (display dialog "What do you want to autocomplete?" default answer "I hate")
set theFileName to change_case_of(thetext, "lower") & ".gif"
set tempdir to POSIX path of (path to temporary items from user domain) & "autogifs/"
do shell script "mkdir " & tempdir
end try
troutcolor / image to width
Created July 9, 2015 19:24
resize images selected in finder (I use in Fast Scripts)
tell application "Finder"
set files_ to selection
set w to the text returned of (display dialog "What width?" default answer "500")
repeat with file_ in files_
repeat 1 times
--set imgkind to (kind of file_)
--if (imgkind does not contain "Image") then
-- exit repeat -- 1 times
troutcolor / Find Flickr Photo.scpt
Last active October 22, 2015 06:52
Apple Script to find where a flickr photo (or photos) selected in the finder comes from. See I use FastScripts to run this sort of thing.
tell application "Finder"
set files_ to selection
repeat with file_ in files_
set imgkind to (kind of file_)
repeat 1 times
set imgkind to (kind of file_)
if (imgkind does not contain "Image") then
troutcolor /
Last active January 10, 2016 11:36
A python script that makes a webpage,, from my pinboard links with thumbnails. Most of the script borrowed from Need webkit2png
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Most of this based on a script from
#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
troutcolor / Sync gh-pages + master branches
Created April 6, 2016 14:18 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference:
$ 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
troutcolor /
Last active December 15, 2019 06:31
#script to download pile of flickr images and make a movie like the pummelvision service # example #needs ffmpeg sox & jhead #needs sips so a mac I think
#2018 additions
#needs jhead which I installed with homebrew
#jhead auto rotates images according to the exif Orientation which ffmpeg does not respect
#if the photos do not need rotated then you could remove the jhead line below
#sox to loop audio. I installed with homebrew
#my video was longer than the audio, I just create a loop of 3 with sox and use that. Could up the number iif you have more photos than me