- use docker
- add env lines in .bashrc
export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="$HOME\.docker\machine\machines\default" export DOCKER_MACHINE_NAME="default"
$ docker run alpine:edge /bin/sh
<?php | |
// This is just a form sample | |
// Add a new section to WooCommerce > Settings > Products | |
function add_my_products_section( $sections ) { | |
$sections['tshirt_designer'] = __( 'T-Shirt Designer', 'my-textdomain' ); | |
return $sections; | |
} | |
add_filter( 'woocommerce_get_sections_products', 'add_my_products_section' ); |
<?php | |
function override_csv_export_storage_method( $args ) { | |
// use the legacy filesystem data store | |
// $args['storage_method'] = 'filesystem'; | |
// use a new, custom data store | |
$args['storage_method'] = 'my-custom-data-store'; | |
<?php | |
/** | |
* Plugin Name: MU plugins subdirectory loader | |
* Plugin URI: https://gist.github.com/lavoiesl/6302907 | |
* Description: Enables the loading of plugins sitting in mu-plugins (as folders) | |
* Version: 0.1 | |
* Author: github@lavoie.sl | |
* Author URI: http://blog.lavoie.sl/ | |
* |
It's hard to migrate section themes that rely heavily on images. This bit of code helps you download all the CDN assets of your theme.
- Create a
cdn_assets
folder - Create the
download_assets.js
file at the root of your project - Edit the
download_assets.js
file to match the path to your settings_data.json (line 3) - Edit the
download_assets.js
file to set the "CDN code" of your store. Each file that you upload from/admin/settings/files
gets uploaded with the following format:https://cdn.shopify.com/s/files/1/YOUR_CDN_CODE/files/YOURFILE
. The format of the code is/\d{4}\/\d{4}/
(four digits, a forward slash, and four digits)
To support my open-source work, consider adding me on Patreon.
An easy to refer to document for regularly setting up macOS 10.14 Mojave.
The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.
WP-CLI, the command-line interface for WordPress, is one of the most popular tools among WordPress developers. However, it can be extremely helpful for anyone managing a WordPress site. In this webinar, the main person behind WP-CLI project: Alain Schlesser will show us the ins and outs of the tool. He will give us great examples on how it can be used to improve your workflow, for beginners to experienced developers and for projects big and small. We will give you invaluable examples on how to perform different tasks with WP-CLI automatically, saving you time and preventing you from making manual errors, like:
- Keep forgetting to backup? Automate the process with WP-CLI.
- Site not working? Get tips for easy troubleshoot with WP-CLI.
- Too many spam comments? Learn how to clean them in no time.
- Can’t log into your site? Reset your password with WP-CLI.
- Go to your Shopify
admin/settings/files
page - Open your browser Dev tools, go to the console
Then, depending on the option you choose:
- Make sure your browser is set to download files automatically and doesn't ask for the download location every time
#!/usr/bin/env zsh | |
function exportDefaults { | |
local outdir="$HOME/defaults" | |
local outdirApple="$outdir/apple" | |
local outdirUser="$outdir/user" | |
local outdirGlobal="$outdir/global" | |
local filesdone=0 | |
local filecount=0 | |
local filestotal=0 |