Make sure there is at least one file in it (even just the README.md)
ssh-keygen -t rsa -C "your_email@example.com"
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat |
// elasticsearch version 7 | |
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.5.2-linux-x86_64.tar.gz | |
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.5.2-linux-x86_64.tar.gz.sha512 | |
shasum -a 512 -c elasticsearch-oss-7.5.2-linux-x86_64.tar.gz.sha512 | |
tar -xzf elasticsearch-oss-7.5.2-linux-x86_64.tar.gz | |
cd elasticsearch-oss-7.5.2/ | |
echo 'export ES_HOME="$HOME/elasticsearch-7.5.2/"' >> ~/.bashrc | |
echo 'export PATH="$ES_HOME/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL |
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat |
<?php | |
// Load the WooCommerce email templates. | |
$wc_emails = WC()->mailer()->get_emails(); | |
/** | |
* You can specify which template mail is to be sent from the following array elements. | |
* 'WC_Email_New_Order' | |
* 'WC_Email_Cancelled_Order' | |
* 'WC_Email_Failed_Order' | |
* 'WC_Email_Customer_On_Hold_Order' |
function flip() { | |
return Math.random() >= 0.5; | |
} | |
function randomNumber(n) { | |
if(n === undefined) throw new Error("n is required"); | |
if(n <= 0) throw new Error("n must be greater than 0"); | |
if(n > 1000000) throw new Error("n must be lower than 1,000,000"); | |
// No need to further calculations |
<!-- Add this to Header --> | |
<div class="header-mini-cart"><?php woocommerce_mini_cart();?></div> | |
<?php | |
// Update Cart Count & Mini Cart | |
add_filter( 'woocommerce_add_to_cart_fragments', 'iconic_cart_count_fragments', 10, 1 ); | |
function iconic_cart_count_fragments( $fragments ) { | |
if(!empty(WC()->cart->get_cart_contents_count())){ |
Also see: https://gist.github.com/lemiorhan/8912188
Here are the simple steps needed to push your local git repository directly to a remote (e.g. prod) server over ssh. This is based on Digital Ocean's Tutorial.
You are developing in a working-directory on your local machine, let's say on the master
branch. Usually people push code to a remote
server like github.com or gitlab.com and pull or export it to a production server. Or you use GitHub's webhooks to send a POST request to a webserver to take appropriate actions such as cloning/checking out a branch on the remote (prod) server.
#Error: Database creation error: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) HINT: Use the same encoding as in the template database, or use template0 as template.
##solution
root@server:~# su postgres
postgres@server:~ $ psql -U postgres
psql (9.0.3)
Type "help" for help.
class custom_sub_walker extends Walker_Nav_Menu { | |
public function start_lvl( &$output, $depth = 0, $args = array() ) { | |
$indent = str_repeat( "\t", $depth ); | |
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n"; | |
} | |
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { | |
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; |