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
./ngrok http -host-header=rewrite localsitename.app:80 |
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
// Disable users REST API endpoints | |
add_action( 'rest_endpoints', function( $endpoints) { | |
foreach ( $endpoints as $endpoint => $args ){ | |
if( false !== strpos( '/wp/v2/users', $endpoint ) ){ | |
unset( $endpoints[ $endpoint ] ); | |
} | |
} | |
return $endpoints; | |
}); |
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
# editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = tab | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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": "gablaxian", | |
"version": "1.0.0", | |
"description": "gablaxian website", | |
"license": "MIT", | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/gablaxian/gablaxian.com.git" | |
}, |
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
// to forward a call and setup voicemail on timeout | |
<Response> | |
<Dial timeout="20" record="record-from-answer">xxx-xxx-xxxx</Dial> | |
</Response> | |
// to forward a sms to another number | |
<Response> | |
<Message to="+1xxxxxxxxxx">{{From}}: {{Body}}</Message> | |
</Response> |
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 | |
/** | |
* Hide email from Spam Bots using a shortcode. | |
* Anti-Spambot Email Shortcode, v1.1.1 | |
* https://wordpress.org/plugins/antispambot | |
* | |
* @param array $atts Shortcode attributes. Not used. | |
* @param string $content The shortcode content. Should be an email address. | |
* | |
* @return string The obfuscated email address. |
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
twitter.com##.is-playing.module.LiveVideoHomePageModule | |
twitter.com##.roaming-module.LiveVideoHomePageModuleContainer |
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 | |
function employeeGrowth ( int $employees, int $employees_6_months_ago) { | |
$employee_percent_change = ($employees - $employees_6_months_ago)/$employees_6_months_ago; | |
$formatter = new NumberFormatter('en_US', NumberFormatter::PERCENT); | |
echo $formatter->format($employee_percent_change); |
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 | |
function formatMoney( int $number = null ) { | |
// display numbers as K or B or M | |
if ($number < 1000) { | |
// Anything less than a thousand | |
$format_num = number_format($number); | |
} else if ($number < 1000000) { | |
// Anything less than a million |
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
/** | |
* Estimate time required to read the article | |
* | |
* @return string | |
*/ | |
function bm_estimated_reading_time() { | |
$post = get_post(); | |
$words = str_word_count( strip_tags( $post->post_content ) ); |