phpMyAdmin will be available on http://localhost:8080
View tampermonkey-script.js
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 |
View gutenberg-locked-template.php
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'], |
View control-blocks-by-post-type.php
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 ); |
View docker-compose.yml
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 |
View polylang-multilingual-sitemap.php
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 | |
/** | |
* Plugin Name: Multilingual Polylang sitemaps for "XML Sitemap & Google News" plugin | |
* Description: For https://wordpress.org/plugins/xml-sitemap-feed/ | |
* Version: 1.0 | |
*/ | |
add_action('xmlsf_tags_after', function () { // xmlsf_tags_after | |
//Bail early. | |
if (!function_exists('pll_languages_list')) { |
View functions.php
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 | |
// Your themes functions.php | |
add_action( 'init', function() { | |
add_rewrite_rule( | |
'recipe/([0-9]+)/?$', | |
'index.php?pagename=recipe&recipe_id=$matches[1]', | |
'top' ); | |
}); |
View PWAOfflineStatus.js
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); |
View README.md
Migrate an Amazing Marvin reading list to Wallabag
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.
Prerequisites
- PHP 7
- Python 3
Process
- Export one or more of your reading lists containings URLs from Amazing Marvin by going to Account > Backups > Backup.
NewerOlder