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
' adapted from https://community.endnote.com/t5/EndNote-How-To/Converting-in-text-citations-to-footnotes-endnotes/td-p/4438/page/2 | |
Public Sub ConvertInTextEndnotesToFootnote() | |
Dim oField As Field | |
Dim sCode As String | |
Dim sSuffix As String | |
Dim sSuffixLeft As String | |
Dim sSuffixRight As String | |
Dim pos1 As Long |
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
Sub MoveFootnoteCitationInline() | |
' declare variable | |
Dim oFeets As Footnotes | |
Dim oFoot As Footnote | |
Dim oRange As Range | |
Dim szFootNoteText As String | |
Dim index As Long | |
Dim oFootRefRange1 As Range | |
Dim oFootRefRange2 As Range |
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
-- makes the verse two lines (use font: 11 to fit) | |
on splitLines(theText) | |
set middleChar to ((length of theText) / 2) | |
set templine2 to text middleChar through (length of theText) of theText | |
set nextSpace to offset of " " in templine2 | |
set splitSpace to middleChar + nextSpace - 1 | |
set line1 to text 1 through splitSpace of theText | |
set line2 to text (splitSpace + 1) through (length of theText) of theText | |
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: JD Gutenberg Shortcode Preview | |
* Description: Live shortcode previews in Gutenberg | |
* Author: johndyer | |
* Version: 1.0.0 | |
* | |
*/ | |
// 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
/** | |
* Calculates Easter in the Gregorian/Western (Catholic and Protestant) calendar | |
* based on the algorithm by Oudin (1940) from http://www.tondering.dk/claus/cal/easter.php | |
* @returns {array} [int month, int day] | |
*/ | |
function getEaster(year) { | |
var f = Math.floor, | |
// Golden Number - 1 | |
G = year % 19, | |
C = f(year / 100), |
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
/* | |
name: DTS Export Markers | |
description: exports markers into JPGs and creates XML in a format DTS's video player can read | |
author: John Dyer | |
created: 2017-04-07 | |
updated: 2017-04-11 | |
version 1.0.1 | |
references: | |
http://cssdk.s3-website-us-east-1.amazonaws.com/sdk/2.1/docs/WebHelp/references/csawlib/com/adobe/premiere/package-detail.html | |
https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/Premiere.jsx |
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
var r = /love/gi, | |
s = 'i love you', | |
a = [s,s,s]; | |
for (var i=0,il=a.length; i<il; i++) { | |
console.log(r.test(a[i])); | |
} | |
/* | |
RESULTS: |
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
#simple version (http://mysite.com/+ goes to your Google+ account) | |
Redirect /+ https://plus.google.com/[yourid] | |
Redirect /@ https://twitter.com/[twitterusername] | |
#powerhouse (http://mysite.com/+/about goes to your Google+ about page) | |
RedirectMatch ^/\+(.*)$ http://plus.google.com/[yourid]$1 | |
RedirectMatch ^/@(.*)$ http://twitter.com/[twitterusername]$1 |
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(d) { | |
var input = d.getElementsByTagName('input'), | |
i = input.length; | |
while (i--) { | |
if (input[i].type === 'checkbox') { | |
input[i].setAttribute('checked', 'checked'); | |
} | |
} | |
})(this.document); |
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 | |
// Super simple caching class | |
class PhpCache { | |
protected $path = null; | |
protected $duration = null; | |
function __construct ( $path, $duration = 60) { | |
$this->path = $path; | |
$this->duration = $duration; | |
} |