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
// ==UserScript== | |
// @name Crosstable for TCEC | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author gitlost | |
// @match https://fierce-cliffs-15335.herokuapp.com/livedemo | |
// @grant none | |
// ==/UserScript== |
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 non_repeating_str( $len = 8192 ) { | |
$ret = ''; | |
mt_srand( 1 ); | |
$iterations = (int) ( $len / 256 ) + 1; | |
for ( $i = 0; $i < $iterations; $i++ ) { | |
$haves = array(); | |
$cnt = 0; | |
while ( $cnt < 256 ) { |
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 | |
set -v | |
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar -nc -q && mv wp-cli-nightly.phar wp-nightly.phar && chmod +x wp-nightly.phar | |
php -dphar.readonly=0 utils/make-phar.php wp-suggest.phar --version=1.4.0-suggest_help --quiet >/dev/null && chmod +x wp-suggest.phar | |
# ---------------------------------------------------------------------- | |
# Help typo in subcommand of early processed command with WP install | |
# BEFORE: nothing happens. |
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 mytheme_tcp_send_order_email_subject( $subject, $order_id ) { | |
$blogname = html_entity_decode( get_bloginfo( "name" ), ENT_QUOTES | ENT_HTML401 ); | |
$details = OrdersDetails::getDetails( $order_id ); | |
$skus = array(); | |
foreach ( $details as $detail ) { | |
$categories = array(); | |
if ( $detail->post_id && ( $terms = get_the_terms( $detail->post_id, TCP_PRODUCT_CATEGORY ) ) ) { | |
foreach ( $terms as $term ) $categories[] = $term->name; | |
} | |
$skus[] = $detail->sku . ( $categories ? ( " (" . implode( ",", $categories ) . ")" ) : "" ); |