Skip to content

Instantly share code, notes, and snippets.

@Biont
Biont / sway-launcher-desktop.sh
Last active Jul 15, 2021
sway-launcher-desktop
View sway-launcher-desktop.sh
#!/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)
@Biont
Biont / multisite.sh
Created Jan 10, 2019
Run WP-CLI command for all sites in the network. Uses 16 threads for parallel execution
View multisite.sh
#!/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 / Lullaby.php
Created Oct 28, 2018
PHP Hush Little Baby
View Lullaby.php
<?php
class Lullaby
{
/**
* @var HumanoidInterface
*/
private $littleBaby;
/**
* @var HumanoidInterface
@Biont
Biont / mlp-set-locale.php
Last active Nov 3, 2016
Sets the WordPress locale to MLP's current blog language, allowing custom/different language files to be loaded
View mlp-set-locale.php
/**
* 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
*/
@Biont
Biont / mlp-autosync-terms.php
Last active Oct 3, 2017
MLP Autosync Terms
View mlp-autosync-terms.php
<?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
*/
/**
View mlp-addon-post-meta.php
<?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