Skip to content

Instantly share code, notes, and snippets.

@schlessera
schlessera / script.md
Last active April 13, 2023 10:54
Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Webinar description

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.
@jdeeburke
jdeeburke / functions.php
Last active June 5, 2021 14:14
Customer/Order CSV Export: Override Storage Method
<?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';
@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

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.

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 16, 2024 17:30
crack activate Office on mac with license file
@ridem
ridem / Download-Shopify-CDN-Assets.md
Last active October 28, 2023 12:15
Download all Shopify CDN assets from a store

Instructions

  1. Go to your Shopify admin/settings/files page
  2. Open your browser Dev tools, go to the console

Then, depending on the option you choose:

Option 1 - Download all the files directly (might crash you browser)

  1. Make sure your browser is set to download files automatically and doesn't ask for the download location every time
@ridem
ridem / README.md
Last active June 27, 2022 07:37
Download a Shopify store's assets used in your theme

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.

  1. Create a cdn_assets folder
  2. Create the download_assets.js file at the root of your project
  3. Edit the download_assets.js file to match the path to your settings_data.json (line 3)
  4. 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)
@K4zuki
K4zuki / INSTALL.md
Last active May 22, 2024 08:54
Alpine linux pandoc setup

Should work on Linux/Mac host!

  • 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
@inoperable
inoperable / defaults-export.zsh
Last active November 8, 2024 17:04
export defaults for all domains in macOS into separate .plist files for editing and importing, files are written into $HOME/defaults
#!/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
@rudelm
rudelm / autofs.md
Last active November 5, 2024 01:57
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

<?php // only copy opening php if needed
/**
* move social login buttons on account form from "login" to "register
*/
function wc_social_login_move_register_buttons() {
if ( function_exists( 'wc_social_login' ) && ! is_admin() ) {
remove_action( 'woocommerce_login_form_end', array( wc_social_login()->get_frontend_instance(), 'render_social_login_buttons' ) );
add_action( 'woocommerce_register_form_end', array( wc_social_login()->get_frontend_instance(), 'render_social_login_buttons' ) );
}