This file contains 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 | |
# A helper script to convert an Apple News URL on the clipboard into | |
# its corresponding canonical URL and put that on the clipboard. | |
import pasteboard | |
import requests | |
import re | |
pb = pasteboard.Pasteboard() |
This file contains 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
function dtd_rssclub($content) { | |
global $wp_query; | |
$postid = $wp_query->post->ID; | |
if(is_feed() && has_category('RSS-Club', $postid) ) { | |
$content = '<div>Dit is een geheim bericht voor iedereen. <a href="/rss-club">Lees alles over de RSS Club</a></div><br /><br />'.$content; | |
} | |
else { | |
$content = $content; | |
} | |
return $content; |
This file contains 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
(* | |
* Inspired by smokey | |
* https://gist.github.com/sardisson/e50286e17c8f2f39bfec9429ed5f46cd | |
* url for thubnail from @smokey too | |
* html Thumbnail image griid from Micro.blog favs | |
* NEEDS JSON Helper free from | |
*https://itunes.apple.com/gb/app/json-helper-for-applescript/id453114608?mt=12 | |
* Needs a App token from micro.blog/account | |
* NO ERROR CHECKING | |
* updated to use cloudimage you need a token from cloudimage.io iin CLOUDIMAGETOKEN below. |
This file contains 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
<?php | |
/* | |
There are some problems with this, use https://github.com/cogdog/wp-posted-today instead. | |
*/ | |
/* | |
* Plugin Name: OnThisDay | |
* Description: shortcode for posts on the current day | |
* Version: 0.1 | |
* Author: John Johnston | |
* Mostly borrowed from https://wordpress.stackexchange.com/questions/53462/on-this-day-php-code/53761 |
This file contains 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
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 |
This file contains 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
<?php // Opening PHP tag - nothing should be before this, not even whitespace | |
//Micro.blog// | |
/* | |
updated 2018-01-29 | |
this is just the micro.blog stuff I've added to my child theme's function php | |
Hopefully most of the credits are noted below | |
This file contains 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/bash | |
#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 |