phpMyAdmin will be available on http://localhost:8080
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
/** Break html5 cart caching */ | |
add_action('wp_enqueue_scripts', 'cartcache_enqueue_scripts', 100); | |
function cartcache_enqueue_scripts() | |
{ | |
wp_deregister_script('wc-cart-fragments'); | |
wp_enqueue_script( 'wc-cart-fragments', get_template_directory_uri() . '/cart-fragments.js', array( 'jquery', 'jquery-cookie' ), '1.0', true ); | |
} |
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
// ==UserScript== | |
// @name Find slot | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Book a Förarprov with the place and type (manual/auto) that you want, then go to Boka Prov > Personbil B > Bokade Prov > Press the edit icon for the existing test. Enable the script and reload the page. The script will look for a better time in the same configuration of auto/manual and location. | |
// @author You | |
// @match https://fp.trafikverket.se/boka/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=trafikverket.se | |
// @require https://cdnjs.cloudflare.com/ajax/libs/ion-sound/3.0.7/js/ion.sound.min.js | |
// @grant none |
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 | |
add_action('init', function() { | |
// For which posts type | |
$post_type_object = get_post_type_object( 'post' ); | |
// Which allowed blocks | |
$post_type_object->template = [ | |
['core/heading', ['level' => '5', 'content' => 'Default value']], | |
['core/paragraph'], | |
['core/image'], |
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 | |
add_filter( 'allowed_block_types_all', function($allowed_block_types, $block_editor_context) { | |
if ( $block_editor_context->post->post_type === 'post' ) { | |
return [ | |
'acf/my-cool-block', | |
'core/paragraph' | |
]; | |
} | |
return $allowed_block_types; | |
}, 10, 2 ); |
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" | |
services: | |
redis: | |
image: "redis:6.2-alpine" | |
command: sh -c "redis-server --appendonly yes" | |
ports: | |
- "6379:6379" | |
volumes: | |
- ./redis-data:/data |
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 | |
add_action('save_post', array($this, 'mark_parent_categories'), 11); | |
/** | |
* Marks parent categories automatically. Works with the ACF taxonomy selector as well. | |
* | |
* @return mixed | |
*/ | |
function mark_parent_categories($post_id) { | |
global $post; |
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
import React, { useState, useEffect } from 'react'; | |
function PWAOfflineStatus(props) { | |
const [isOnline, setOnlineStatus] = useState(true); | |
// https://stackoverflow.com/questions/44756154/progressive-web-app-how-to-detect-and-handle-when-connection-is-up-again | |
useEffect(() => { | |
const setFromEvent = function(event) { | |
if(event.type === 'online') { | |
setOnlineStatus(true); |
Example: You've been using the Amazing Marvin Bookmarklet and now the tasks have piled up and Marvin is acting sluggish. Wallabag is a prefect place to migrate these bookmarks.
- PHP 7
- Python 3
- Export one or more of your reading lists containings URLs from Amazing Marvin by going to Account > Backups > Backup.