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
docker run --rm -l traefik -p 8080:8080 -p 80:80 \ | |
-v $PWD/traefik.toml:/etc/traefik/traefik.toml \ | |
-v /var/run/docker.sock:/var/run/docker.sock traefik |
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
for i in `docker ps -a -q | awk '{print $1}'`; do echo $(docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $i) $(docker ps | grep $i | awk '{print $NF}') ; done |
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 | |
// Hack due https://core.trac.wordpress.org/ticket/23431 issue | |
$embed = new WP_Embed(); | |
$content = $embed->run_shortcode( $wp_query->queried_object->description ); | |
echo '<div class="category-description">' . do_shortcode( $content ) . '</div>'; |
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
/** | |
* Remove products breadcrumb | |
* | |
* @param object $breadcrumb_obj Breadcrumb object. | |
*/ | |
function my_bcn_after_fill( $breadcrumb_obj ) { | |
if ( is_category() || is_tag() || is_tax() ) { | |
foreach ( $breadcrumb_obj->breadcrumbs as $key => $item ) { | |
if ( 'Products' === $item->get_title() ) { | |
unset( $breadcrumb_obj->breadcrumbs[ $key ] ); |
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
diff --git a/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php b/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
index e77ed03..2e41933 100644 | |
--- a/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
+++ b/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
@@ -83,6 +83,9 @@ if ( ! class_exists( 'Pie_WCWL_Waitlist_Mailout' ) ) { | |
public function add_user_to_archive( $product_id, $user_id ) { | |
$existing_archives = get_post_meta( $product_id, 'wcwl_waitlist_archive', true ); | |
$today = strtotime( date( "Ymd" ) ); | |
+ if (empty($existing_archives)) { | |
+ $existing_archives = array(); |
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: WordPress Sentry | |
* Plugin URI: https://github.com/stayallive/wp-sentry | |
* Description: A (unofficial) WordPress plugin to report PHP and JavaScript errors to Sentry. | |
* Version: must-use-proxy | |
* Author: Alex Bouma | |
* Author URI: https://alex.bouma.me | |
* License: MIT | |
*/ |
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 parsed = [], titles = $$('h3 a'); | |
for (i in titles) { | |
parsed.push((titles[i].text).trim()); | |
} | |
console.log(parsed); | |
//copy(parsed); // Copy to clipboard |
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 | |
ss -tnpa |grep ESTAB |grep ssh |