Skip to content

Instantly share code, notes, and snippets.

@Biont
Biont / mlp-set-locale.php
Last active November 3, 2016 00:48
Sets the WordPress locale to MLP's current blog language, allowing custom/different language files to be loaded
/**
* Plugin Name: MLP Load Language Files
* Description: Sets the WP locale to MLP's current blog language so that different language files can be loaded
* Author: Inpsyde GmbH
* Author URI: http://inpsyde.com
* Text Domain: multilingualpress
* Domain Path: /languages
* License: GPLv3
*/
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: MLP Addon: Sync post meta fields
* Plugin URI: https://gist.github.com/toscho/6393c79aacba0983a96a
* Description: Create a custom field, put it into the MLP translation box, and sync it across the sites.
* Version: 2015.03.03
* Required: 4.0
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
@Biont
Biont / mlp-autosync-terms.php
Last active October 3, 2017 09:34
MLP Autosync Terms
<?php
/**
* Plugin Name: MLP Autosync Terms
* Description: Automatically sync all linked terms when a post is saved
* Author: Biont
* Author URI: https://github.com/Biont
* License: GPLv3
*/
/**
@Biont
Biont / Lullaby.php
Created October 28, 2018 19:42
PHP Hush Little Baby
<?php
class Lullaby
{
/**
* @var HumanoidInterface
*/
private $littleBaby;
/**
* @var HumanoidInterface
@Biont
Biont / multisite.sh
Created January 10, 2019 09:01
Run WP-CLI command for all sites in the network. Uses 16 threads for parallel execution
#!/usr/bin/env bash
# Usage: multisite.sh plugin list
N=16
i=0
for URL in $(wp site list --field=url); do
((i=i%N)); ((i++==0)) && wait
@Biont
Biont / sway-launcher-desktop.sh
Last active March 9, 2024 23:50
sway-launcher-desktop
#!/usr/bin/env bash
# terminal application launcher for sway, using fzf
# Based on: https://gitlab.com/FlyingWombat/my-scripts/blob/master/sway-launcher
shopt -s nullglob
if [[ "$1" == 'describe' ]]; then
shift
if [[ $2 == 'command' ]]; then
title=$1
readarray arr < <(whatis -l "$1" 2>/dev/null)