Skip to content

Instantly share code, notes, and snippets.


John Johnston troutcolor

View GitHub Profile
troutcolor /
Created December 20, 2022 20:01
#script to download pile of flickr images and make a montage #needs montage command which comes with imagemagick I install that with homebrew #some notes at the end of the file
#script to download pile of flickr images and make a montage
#needs montage command which comes with imagemagick I install that with homebrew
#some notes at the end of the file
#Fill in the params any except the APIKEY can be empty
# this will take some time!
View Feedland.css
body { background-image: linear-gradient(to right, #00b09b, #96c93d); }
#idProductLogo img{ border-radius:25%; }
@media screen and (max-width: 1200px) {
.divRiverDisplay { width: 95%; }
.divRiverContent{ width:98%; }
.divMoreButton { display:block; }
.divPageBody { width:94%; }
.divPageBody { margin-top: 30px; }
troutcolor /
Last active September 25, 2022 18:56
AppleScript droplet to pad images with a 10 pixel black border. Most of this is straight from the image processing template in the Script Editor except for line 92-99. To use make a new script, paste this in and save choose application as type.
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software ( the "Apple Software" ), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and / or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Inc. may
troutcolor / via-indie-web-bookmarklet
Last active January 4, 2021 17:45
Book marklet from ChristAldrich, updated to copy to clip.
View via-indie-web-bookmarklet
javascript:(function(){let text = "";if (window.getSelection() != '') {text = window.getSelection().toString() + '\n';}var tocopy = '<p><small><cite class="h-cite via"><abbr title="via">ᔥ</abbr> <span class="p-author h-card">"' + text + '"</span> in <a class="u-url p-name" href="' + location.href + '" target="_blank" rel="noopener noreferrer" >' + document.title + '</a> (<time class="dt-published">' + document.lastModified + '</time>)</cite></small></p>';;d=document;d.body.appendChild(Object.assign(d.createElement('textarea'),{value:tocopy})).select();d.execCommand('copy');})()
troutcolor / micoblog_functions.php
Last active August 10, 2020 16:27
functions that have do with and microblogging that live in my child theme's functions.php
View micoblog_functions.php
<?php // Opening PHP tag - nothing should be before this, not even whitespace
updated 2018-01-29
this is just the stuff I've added to my child theme's function php
Hopefully most of the credits are noted below
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
troutcolor / Notes-Export-to-HTML.scpt
Last active September 16, 2019 18:22
Export a folder to html with page breaks for printing. Used as a starter.
View Notes-Export-to-HTML.scpt
set htmltop to "<!doctype html>
<html lang=\"en\">
<meta charset=\"utf-8\">
<title>Notes Export</title>
@media print {
hr {
page-break-after: always;
troutcolor /
Last active April 12, 2019 02:10
This is a script for alfred to post to a WordPress, adding the category micro, post format status and as a note. There is no title. I use a hotkey cmd-alt-cnrl-m alfred passes the selected text in the topmost app to the script as q. I don't deal with special chars. Password hard coded is probably not a good idea. Obviously you could edit categor…
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 ""
set myPosts to call xmlrpc {method name:"wp.newPost", parameters:{"1", myBlogUsername, myBlogPass, poststrut}}
return myPosts
end tell
end alfred_script
troutcolor /
Last active February 10, 2019 13:18
AppleScript Get your favourites from find photos and make thumbnail grid needs JSON Helper and an app token from your account
* Inspired by smokey
* url for thubnail from @smokey too
* html Thumbnail image griid from favs
* NEEDS JSON Helper free from
* Needs a App token from
* updated to use cloudimage you need a token from iin CLOUDIMAGETOKEN below.
troutcolor / OnThisDay.php
Last active February 1, 2019 17:26
simple shortcode plugin to display posts from the current day. I put it in a folder onthisday inside my plugins folder. Then make a page and add [onthisday] NB thewre are a few problems with thiis, use instead.
View OnThisDay.php
There are some problems with this, use instead.
* Plugin Name: OnThisDay
* Description: shortcode for posts on the current day
* Version: 0.1
* Author: John Johnston
* Mostly borrowed from