Adminer is in the repos, so install it with:
apt install adminer
Copy the configuration to your available configs folder and enable it.
cp /etc/adminer/apache.conf /etc/apache2/conf-available/adminer.conf
Adminer is in the repos, so install it with:
apt install adminer
Copy the configuration to your available configs folder and enable it.
cp /etc/adminer/apache.conf /etc/apache2/conf-available/adminer.conf
<?php | |
/* | |
This script will allow you to send a custom email from anywhere within wordpress | |
but using the woocommerce template so that your emails look the same. | |
Created by [email protected] on 27th of July 2017 | |
Put the script below into a function or anywhere you want to send a custom email | |
*/ |
/*Contact form 7 remove span*/ | |
add_filter('wpcf7_form_elements', function($content) { | |
$content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content); | |
$content = str_replace('<br />', '', $content); | |
return $content; | |
}); |
<?php | |
// this is in the `/config` folder | |
$app->on("collections.save.before.aktuelles", function($name, &$entry, $isUpdate) use ($app) { | |
// generate slug on create only or when an existing one is empty | |
if (!$isUpdate || ($isUpdate && trim($entry['slug']) == '')) { | |
// generate slug based on entry name | |
$slug = Str::slug($entry['name']); |
{{ $image := .Params.image}} | |
{{ $media := (.Site.GetPage "page" "media").Resources }} | |
{{ $original := index ($media.Match (printf "%s" $image)) 0 }} | |
{{ $width := $original.Width}} | |
{{ $intWidth := int $width }} | |
{{ $sizes := .Params.sizes}} | |
{{ $options := .Params.options}} | |
{{ if le (len $sizes) 1 }} | |
{{ $oneSize := index $sizes 0}} |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
pm2 start artisan --name laravel-worker --interpreter php -- queue:work --daemon
https://hazaveh.net/2018/01/run-and-monitor-laravel-queue-using-pm2/
import { cacheAdapterEnhancer } from 'axios-extensions' | |
import LRUCache from 'lru-cache' | |
const ONE_HOUR = 1000 * 60 * 60 | |
const defaultCache = new LRUCache({ maxAge: ONE_HOUR }) | |
export default function ({ $axios }) { | |
const defaults = $axios.defaults | |
// https://github.com/kuitos/axios-extensions | |
defaults.adapter = cacheAdapterEnhancer(defaults.adapter, { |
//Orders | |
wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_orders_endpoint', 'orders' ) ); | |
//Downloads | |
wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_downloads_endpoint', 'downloads' ) ); | |
//Edit Address | |
wc_get_account_endpoint_url( get_option( 'woocommerce_myaccount_edit_address_endpoint', 'edit-address' ) ); | |
//Payment Methods |