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
/* | |
* Goes in your theme's functions.php, replace '/img/default-image.jpg' with | |
* the path to the custom placeholder image in your theme. | |
*/ | |
add_filter ('woocommerce_placeholder_img_src', () => get_stylesheet_directory_uri() . '/img/default-image.jpg'); |
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 | |
WP_PATH="/srv/example/public_html" | |
for SITE_URL in $(wp site list --field=url --archived=0 --deleted=0 --path="$WP_PATH") | |
do | |
echo -e "\n$SITE_URL" | |
wp cron event run --due-now --path="$WP_PATH" --url="$SITE_URL" | |
done |
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 | |
function kt { | |
(&>/dev/null kate "$@" & exit) | |
} | |
function dolp { | |
(&>/dev/null dolphin "${@:-.}" & exit) | |
} |
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
cd "$(dirname "$(readlink -f "$0")")" || (echo "Failed to change directory." && exit 1) |
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 /** @noinspection PhpMultipleClassesDeclarationsInOneFile */ | |
declare(strict_types=1); | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; |
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
version: '3.8' | |
services: | |
php: | |
image: ajdinmore/php:8.1-dev | |
hostname: php | |
tty: true | |
volumes: | |
- ./:/app | |
- ${COMPOSER_HOME:-~/.composer}:/composer | |
environment: |
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 | |
declare(strict_types=1); | |
/** | |
* Plugin Name: WooCommerce Import Fix 2022-10-05 | |
* Description: Fixes importing variable product drafts. | |
*/ | |
add_filter('woocommerce_product_importer_formatting_callbacks', function (array $callbacks, \WC_Product_Importer $importer) { | |
$key = array_search('published', $importer->get_mapped_keys()); | |
if (false !== $key && isset($callbacks[$key])){ |
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 | |
if [ "$(id -u)" -ne 0 ]; then | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
xdg-open ~/Downloads &> /dev/null & | |
xdg-open 'https://www.gitkraken.com/download/linux-deb' &> /dev/null & | |
xdg-open 'https://www.jetbrains.com/toolbox-app/download/download-thanks.html?platform=linux' &> /dev/null & | |
xdg-open 'https://slack.com/intl/en-gb/downloads/linux' &> /dev/null & |
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
export GPG_TTY=$(tty) | |
export DOCKER_BUILDKIT=1 |
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
#file: noinspection SpellCheckingInspection | |
# https://docs.docker.com/engine/reference/commandline/service_create/#create-services-using-templates | |
# https://docs.docker.com/config/containers/logging/awslogs/#tag | |
# https://docs.docker.com/config/containers/logging/log_tags/ | |
# https://forums.docker.com/t/example-usage-of-docker-swarm-template-placeholders/73859 | |
services: | |
service: | |
image: busybox | |
command: env | |
hostname: '{{.Task.Name}}-{{.Node.Hostname}}' |
OlderNewer