I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)
This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.
<?php | |
/** | |
* Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes. | |
* | |
* <p>Because Wordpress generates all image sizes on first upload, if you change | |
* theme or size settings after the upload, there won't be a matching file for | |
* the requested size.<br/> | |
* This filter addresses the problem of the default downsize process laoding | |
* a large file and scaling it down in the browser if it doesn't find the right | |
* size image. This can cause large files to be loaded unnecessarily and will |
// SHIPPING IN CART | |
add_filter( 'woocommerce_cart_item_name', 'wcv_shipping_cart_item', 1, 3 ); | |
function wcv_shipping_cart_item( $title = null, $cart_item = null, $cart_item_key = null ) { | |
$settings = get_option( 'woocommerce_wcv_pro_vendor_shipping_settings' ); | |
$customer_address = array( 'country' => WC()->customer->get_shipping_country(), 'state' => WC()->customer->get_shipping_state() ); | |
$package = array( 'destination' => $customer_address ); | |
$shipping_rate = WCVendors_Pro_Shipping_Method::get_shipping_rate( $cart_item[ 'product_id' ], $cart_item['data']->post->post_author, $package, $settings ); | |
if( $cart_item_key && is_cart() ) { | |
echo $title. '<br /><span class=""><br>Shipping : ' . get_woocommerce_currency_symbol(). $shipping_rate->fee . '</span>'; | |
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone [email protected]:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync [email protected]:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
<?php | |
/** | |
* WordPress Customizer Comprehensive Reference | |
* Compiled by @ti_asif | |
*/ | |
Panel | |
Section |
location ~* \.html$ { | |
add_header x-flying-press-cache HIT; | |
add_header x-flying-press-source Nginx; | |
} | |
set $flying_press_cache 1; | |
set $flying_press_url "/wp-content/cache/flying-press/$request_uri/index.html"; | |
set $flying_press_file "$document_root/wp-content/cache/flying-press/$request_uri/index.html"; | |
if ($request_method = POST) { |
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
VirtualBox only supports the x86 platform, so the default installation instructions for Vagrant does not work on Apple silicon. Thankfully Vagrant has a VMWare Provider (more on providers here), and so if I can get VMWare running on my M1 MacBook, I should be able to run Vagrant as well!
These are my notes during figuring this out.
We are in luck, as VMWare released this just a few weeks ago.
<?php | |
/** | |
* Checks if all characters of a given string are supported by OTF file | |
* Outputs the findings in a simple HTML table | |
* | |
* Needs: php-font-lib @ https://github.com/PhenX/php-font-lib | |
*/ | |
require_once "../src/FontLib/Autoloader.php"; |