This file contains hidden or 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
//Woocommerce Checkout JS events | |
$( document.body ).trigger( 'init_checkout' ); | |
$( document.body ).trigger( 'payment_method_selected' ); | |
$( document.body ).trigger( 'update_checkout' ); | |
$( document.body ).trigger( 'updated_checkout' ); | |
$( document.body ).trigger( 'checkout_error' ); | |
//Woocommerce cart page JS events | |
$( document.body ).trigger( 'wc_cart_emptied' ); | |
$( document.body ).trigger( 'update_checkout' ); |
This file contains hidden or 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 | |
@ini_set('display_errors', 0); | |
@ini_set('log_errors', 0); | |
@error_reporting(0); | |
function genstr($length = 10) | |
{ | |
return substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length); | |
} |
This file contains hidden or 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 getSheetDataAsJSON() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var range = sheet.getDataRange(); | |
var values = range.getValues(); | |
var headers = values[0]; | |
var jsonData = []; | |
for (var i = 1; i < values.length; i++) { | |
var row = values[i]; | |
var rowObj = {}; |
This file contains hidden or 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 | |
/** | |
* Heres how to add custom macro for JetEngine. | |
* In This example - get the current user property, such as ID, user_email, etc. | |
* Note! | |
* Register macros on jet-engine/register-macros action only, | |
* as the base macro class \Jet_Engine_Base_Macros is not available before that action; | |
* after it - all macros are registered already | |
*/ |
This file contains hidden or 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
alias sail='bash vendor/bin/sail' | |
alias sdown='bash vendor/bin/sail down' | |
alias sa='bash vendor/bin/sail artisan' | |
alias sup='bash vendor/bin/sail up -d' | |
alias sdown='bash vendor/bin/sail down' | |
alias snpm='bash vendor/bin/sail npm' | |
alias sdev='bash vendor/bin/sail npm run development' | |
alias sprod='bash vendor/bin/sail npm run production' | |
alias snpmi='bash vendor/bin/sail npm install' | |
alias snpmu='bash vendor/bin/sail npm update' |
This file contains hidden or 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
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
This file contains hidden or 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 | |
$reflFunc = new ReflectionFunction('THE_FUNCTION_NAME_HERE'); | |
echo $reflFunc->getFileName() . ':' . $reflFunc->getStartLine(); | |
?> |
This file contains hidden or 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/sh | |
PRODUCT_ID=$1 | |
if [ -z "${PRODUCT_ID}" ]; then | |
echo "Requires a product ID" | |
echo | |
echo "run \"./script.sh <id>\"" | |
fi |
This file contains hidden or 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
console.log("%c WARNING!!!", "color:#FF8F1C; font-size:40px;"); | |
console.log("%c This browser feature is for developers only. Please do not copy-paste any code or run any scripts here. ", "color:#003087; font-size:12px;"); | |
console.log("%c For more information, http://en.wikipedia.org/wiki/Self-XSS", "color:#003087; font-size:12px;"); |
This file contains hidden or 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
add_role( "subscriber", "Subscriber", array( | |
'read' => 1, | |
'level_0' => 1, | |
) ); |
NewerOlder