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 | |
$branches = ''; | |
exec( 'git branch -vv', $branches ); | |
foreach ( $branches as $branch ) { | |
if ( false === strpos( $branch, ': gone]' ) ) { | |
continue; | |
} |
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
Greetings (first name), | |
Long time no speak. | |
I wanted to drop you a note to say how much I enjoyed working together on the [project] last [month/time period]. | |
I’m running a special this month on [insert task from IDEA BANK], for all my client’s I’ve worked with previously. | |
I’ve found batching tasks for clients helps me perform them more efficiently and allows me to offer a discount on my normal rate for that service… |
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
Greetings [first name], | |
Long time no speak. | |
I wanted to drop you a note to say how much I enjoyed working together on the [project] last [month/time period]. | |
I’ll be blunt... I’d really like to work with you again. | |
If you have any exciting projects coming up, or you’d like to outsource some work you’d prefer someone else do, I’m here and eager to support you... |
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 | |
/** | |
* Singleton class | |
*/ | |
class Singular { | |
/** | |
* Singular instance holder | |
* | |
* @var self |
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 | |
add_filter( 'use_block_editor_for_post', 'my_prefix_maybe_allow_block_editor', 20, 2 ); | |
/** | |
* @see https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-admin/includes/post.php#L2093 | |
* | |
* @param bool $use_block_editor | |
* @param string $post_type | |
* | |
* @return bool |
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 | |
/** | |
* Generate safe password check by "Have I been Pwned API" | |
* | |
* @see https://haveibeenpwned.com/API/v2#PwnedPasswords | |
*/ | |
class Safe_Password_Generator { | |
/** |
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
SELECT ID as id, post_title as name, | |
( 6371 * acos( cos( radians({$lat}) ) | |
* cos( radians( lat.meta_value ) ) | |
* cos( radians( lng.meta_value ) | |
- radians({$lng}) ) | |
+ sin( radians({$lat}) ) | |
* sin( radians( lat.meta_value ) ) ) | |
) AS distance FROM wp_posts | |
JOIN wp_postmeta as lat ON ID = lat.post_id AND lat.meta_key = 'ng_lat' | |
JOIN wp_postmeta as lng ON ID = lng.post_id AND lng.meta_key = 'ng_lng' |
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
Verifying my Blockstack ID is secured with the address 1HuDixFbLfE52FchHYnhsfQNEVxxtb8qZu https://explorer.blockstack.org/address/1HuDixFbLfE52FchHYnhsfQNEVxxtb8qZu |
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
// requires | |
var filesystem = require( 'fs' ); | |
/** | |
* Plugin base arguments | |
* | |
* @type {Object} | |
*/ | |
var plugin_args = { | |
path : './', // plugin directory path |
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
// select handler | |
var on_file_select = function ( $button ) { | |
return function () { | |
// fetch selected file | |
selected_file_url = file_frame.state().get( 'selection' ).first().toJSON().url; | |
// set linked field input new value | |
$button.closest( '.acf-input' ).find( '.acf-url input[type=url]' ).val( selected_file_url ).trigger( 'change' ); | |
}; | |
}; |
NewerOlder