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 | |
if ( ! function_exists( 'ucc_post_format_feedwordpress_syndicated_post' ) ) { | |
function ucc_post_format_feedwordpress_syndicated_post ( $data ) { | |
$feed = $data['meta']['syndication_feed']; | |
// Adjust stripos contents as needed. | |
if ( stripos( 'delicious.com', $feed ) !== false ) { | |
$data['tax_input']['post_format'] = 'post-format-link'; | |
} elseif ( stripos( 'tumblr.com', $feed ) !== false ) { |
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
$.fn.wordify = function(){ | |
this.find(":not(iframe,textarea)").addBack().contents().filter(function() { | |
return this.nodeType === 3; | |
}).each(function() { | |
var textnode = $(this); | |
var text = textnode.text(); | |
text = text.replace(/([^\s-.,;:!?()[\]{}<>"]+)/g,'<span>$1</span>'); | |
textnode.replaceWith(text); | |
}); | |
return this; |
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
-- Convert date function. Call with string in YYYY-MM-DD HH:MM:SS format (time part optional) | |
to convertDate(textDate) | |
set resultDate to the current date | |
set the month of resultDate to (1 as integer) | |
set the day of resultDate to (1 as integer) | |
set the year of resultDate to (text 1 thru 4 of textDate) | |
set the month of resultDate to (text 6 thru 7 of textDate) | |
set the day of resultDate to (text 9 thru 10 of textDate) | |
set the time of resultDate to 0 |
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
-- convert an AppleScript Date object to a POSIX date CCYYMMDDHHmm.SS | |
on posixDate(datetime) | |
-- date -j -f "%A, %B %e, %Y at %I:%M:%S %p" "Tuesday, September 1, 2015 at 11:00:00 AM" +%Y%m%d%H%M | |
set command to "date -j -f '%A, %B %e, %Y at %I:%M:%S %p' '" & datetime & "'" | |
set command to command & " +%Y%m%d%H%M.%S" | |
set thePosixDate to do shell script command | |
return thePosixDate | |
end posixDate |
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 | |
/* | |
Plugin Name: Import Venues WP CLI command | |
Plugin URI: http://wordpress.org/plugins/hello-dolly/ | |
Description: Adds `wp eo venue import <path-to-file>` command. | |
Author: Stephen Harris | |
Version: 0.1 | |
*/ | |
// Exit if accessed directly |
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
tell application "TextEdit" | |
activate | |
make new document | |
end tell | |
tell application "Notes" | |
if folder "Archive" exists then | |
set output to "" | |
repeat with aNote in notes in folder "Archive" |
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
<?xml version="1.0"?> | |
<opml version="2.0"> | |
<head> | |
<title>mylist.opml</title> | |
</head> | |
<body> | |
<outline text="Feeds" type="include" url="https://dl.dropboxusercontent.com/u/36518280/river5/includedTestList2.opml"/> | |
</body> | |
</opml> |
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 | |
// Remove Title from 'Status' Custom Post Type Feed | |
function remove_post_title_rss($title) { | |
global $post; | |
$post_type = get_post_type($post->ID); | |
if ($post_type == 'status') { | |
$title = ''; | |
} | |
return $title; |
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
(* | |
* Thumbnail image from Micro.blog post | |
* Creates a thumbnail from the first image present in a given Micro.blog post | |
* v1.0.7 | |
* 2019-08-18 | |
* https://gist.github.com/sardisson/e50286e17c8f2f39bfec9429ed5f46cd | |
*) | |
on run | |
-- gruber's get browser routine, with a twist to exclude non-Apple/Google browsers |
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
# in /etc/systemd/system | |
[Unit] | |
Description=Bluetooth Agent | |
[Service] | |
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput | |
Type=simple | |
[Install] | |
WantedBy=multi-user.target |
OlderNewer