Skip to content

Instantly share code, notes, and snippets.

Mattias Fjellvang simplenotezy

Block or report user

Report or block simplenotezy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
simplenotezy / install-wp-plugin.php
Created Jan 24, 2020
Programatically install and activate WordPress plugins - automatically find activation path - based on:
View install-wp-plugin.php
* Hide the 'Activate Plugin' and other links when not using QuietSkin as these links will
* fail when not called from /wp-admin
class QuietSkin extends \WP_Upgrader_Skin {
public function feedback($string, ...$args) { /* no output */ }
simplenotezy / wp-cli.php
Last active Oct 23, 2019
Migrate from "WooCommerce Multi Currency Premium" to WPML's own multi-currency
View wp-cli.php
* Below script helps you migrate from "WooCommerce Multi Currency Premium" by VillaTheme to WPML's own multi-currency
* This is helpful if you've added WPML to your site, after setting up multi currency, and would like to lower
* your plugin overhead, or if you're experiecing issues with VillaTheme's plugin.
* Esentially, when you run below script, it will migrate all the postmeta from your products / variations from meta
* values "_DKK" to "_price_DKK", etc.
* NOTE: This script does not handle scheduled prices, but it can be easilly managed. Also sale price is not included,
simplenotezy / gist:c30ca5b0aea87ec0df57
Created Feb 8, 2016
Decode 64 hexadecimal characters APNS token to 32bit
View gist:c30ca5b0aea87ec0df57
function base64_decode_apns_token($token) {
$a = unpack("H*hex", base64_decode($token));
$b = str_split($a["hex"], 8);
$output = "";
foreach ($b as $current) {
$output .= "$current";
return trim($output);
You can’t perform that action at this time.