Skip to content

Instantly share code, notes, and snippets.


Stanislav Khromov khromov

View GitHub Profile
khromov /
Last active Sep 20, 2020
docker-compose file for phpMyAdmin and MySQL
khromov / polylang-multilingual-sitemap.php
Last active Sep 15, 2020
Multilingual Polylang sitemaps for "XML Sitemap & Google News" plugin
View polylang-multilingual-sitemap.php
* Plugin Name: Multilingual Polylang sitemaps for "XML Sitemap & Google News" plugin
* Description: For
* Version: 1.0
add_action('xmlsf_tags_after', function () { // xmlsf_tags_after
//Bail early.
if (!function_exists('pll_languages_list')) {
View functions.php
// Your themes functions.php
add_action( 'init', function() {
'top' );
View built-share-[id].js
(window.webpackJsonp = window.webpackJsonp || []).push([
[21], {
"+51p": function(t, n, e) {
"use strict";
e.r(n), e.d(n, "__N_SSP", (function() {
return m
var o = e("q1tI"),
r = e.n(o),
c = e("8Kt/"),
khromov / PWAOfflineStatus.js
Last active Jul 26, 2020
React Progressive Web App Online / Offline warning message hook
View PWAOfflineStatus.js
import React, { useState, useEffect } from 'react';
function PWAOfflineStatus(props) {
const [isOnline, setOnlineStatus] = useState(true);
useEffect(() => {
const setFromEvent = function(event) {
if(event.type === 'online') {
khromov /
Last active May 16, 2020
Migrate an Amazing Marvin list to Wallabag

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.


  • PHP 7
  • Python 3


  • Export one or more of your reading lists containings URLs from Amazing Marvin by going to Account > Backups > Backup.
khromov / wp-config.php
Last active Oct 1, 2019
Convert MySQL connection string to wp-config.php parameters
View wp-config.php
// This will usually be received from an env variable, for example $connectionString = getenv('DB_URL');
$connectionString = 'mysql://';
// The values below will be your default values if $connectionString is empty.
$dbConfig = array_merge(
'host' => 'localhost',
khromov /
Created Jul 12, 2019
Amazing Marvin webhook

Webhook for Amazing Marvin

In order for this to work you need to fetch your Zapier token from Marvin Settings > Strategies > Zapier integration > Settings.

However, you don't actually need a Zapier for this to work, just send the request from your favourite framework.

khromov / fix-broken-instagram.php
Last active Mar 1, 2018
Fix broken / overlapping Instagram embed for WordPress
View fix-broken-instagram.php
* Plugin Name: Fix broken Instagram oEmbed
* Description: Fixes an issue with Instagram posts being broken when multiple posts are oEmbedded.
* Version: 1.0
* Author: khromov
* Remove Instagram embed.js script on each embed
khromov / infogram-oembed.php
Created Oct 19, 2017
Infogram oEmbed plugin
View infogram-oembed.php
Plugin Name: Infogram oEmbed
Plugin URI:
Description: Adds oEmbed support for and urls.
Author: khromov
Version: 1.0
Author URI: