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 | |
DEBIAN_FRONTEND="noninteractive" | |
# Default values for parameters | |
DEFAULT_PHP_VERSION=8.3 | |
DEFAULT_NODE_VERSION=20 | |
DEFAULT_DOMAIN="example.test" | |
DEFAULT_USER="example" | |
DEFAULT_MYSQL_PASSWORD=$(openssl rand -base64 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 | |
/* | |
* Context: | |
* Sometime we may need to get the `order_id` in checkout page. When redirecting from `order-pay` you can grab it from `query_var`. But as soon as you reload the page it's lost. | |
*/ | |
// You can access it from WooCommerce Session. For pending order there is a key named `order_awaiting_payment` in WooCommerce Session. | |
// Method 1: using `WC_Session_Handler` | |
$wc_session = new WC_Session_Handler(); |
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
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
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 | |
if ( ! function_exists( 'hippo_plugin_hook_info' ) ): | |
function hippo_plugin_hook_info( $hook_name ) { | |
global $wp_filter; | |
$docs = array(); | |
$template = "\t - %s Priority - %s.\n\tin file %s #%s\n\n"; | |
echo '<pre>'; |