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
-- | |
-- @author Gregory Karpinsky, http://www.tiv.net/ | |
-- @version 14.05.28 | |
-- | |
SELECT | |
tp.name Cat, | |
t.name Subcat | |
FROM | |
wp_term_taxonomy tt, | |
wp_terms t, |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>ACE Editor: submit, beautify and minify</title> | |
<style type="text/css" media="screen"> | |
#ace_js, #ace_css { | |
width: 95%; | |
height: 15em; | |
border: 1px solid silver; |
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
check host redis.host with address 127.0.0.1 | |
if failed port 6379 protocol redis then alert | |
check process redis-server with pidfile "/var/run/redis/redis-server.pid" | |
start program = "/etc/init.d/redis-server start" | |
stop program = "/etc/init.d/redis-server stop" | |
if failed host 127.0.0.1 port 6379 then restart | |
if 5 restarts within 5 cycles then timeout |
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 | |
/** | |
* File: apigen-hooks.php | |
* | |
* NOTE: this code is used internally in WPGlobus project. | |
* It's a W.I.P. - please use it, but do not forget to adapt for your project. | |
* | |
* @package WPGlobus\APIGen | |
* @author Gregory Karpinsky (@tivnet) | |
*/ |
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
[woopaywall_show_after_purchase] | |
The content placed here is hidden until paid. | |
For example, you can hide a YouTube video here: | |
[video src="https://www.youtube.com/watch?v=z6e_W6L6sTg"] | |
[/woopaywall_show_after_purchase] |
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
#!/bin/bash | |
# Path to the PHP executable | |
php="/cygdrive/c/PHP/php.exe" | |
for ((n=1; n <= $#; n++)); do | |
if [ -e "${!n}" ]; then | |
# Converts Unix style paths to Windows equivalents | |
path="$(cygpath --mixed ${!n} | xargs)" |
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 | |
// plugins/woocommerce-api-manager/includes/class-wc-am-update-api.php | |
// Add `$response->tested` to show "100% compatible" on the Updates page. | |
case 'pluginupdatecheck': | |
$response->id = $post_id; | |
$response->slug = ! empty( $this->slug ) ? $this->slug : $slug; | |
$response->plugin = $plugin_name; | |
$response->new_version = $api_data[ '_api_new_version' ]; | |
$response->url = $api_data[ '_api_plugin_url' ]; |
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 ___return_currency_USD() { | |
return 'USD'; | |
} | |
// Temporarily set active currency to "USD". | |
\add_filter( 'woocommerce_multicurrency_override_currency', '___return_currency_USD' ); | |
// Create order programmatically. | |
$logger = \wc_get_logger(); | |
$product_id = 10; |
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 | |
/** | |
* Demonstration of debug_backtrace change in PHP 7. | |
* | |
* `call_user_func` and `call_user_func_array` do not appear as separate calls in the trace. | |
* | |
* @author Gregory Karpinsky (@tivnet) | |
*/ | |
main(); |
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
[woopaywall_hide_after_purchase] | |
The content placed here is shown only until paid. | |
Hey, here is a sales pitch! You definitely must buy this NOW! | |
[/woopaywall_hide_after_purchase] |
NewerOlder