Skip to content

Instantly share code, notes, and snippets.

View lkraav's full-sized avatar

Leho Kraav lkraav

View GitHub Profile
thesamesam /
Last active April 25, 2024 13:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.


On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

khalidx /
Last active April 22, 2024 15:40
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!


felixarntz / server-timing-extra.php
Last active August 9, 2023 05:23
Mini WordPress plugin that uses the Server Timing API of the Performance Lab plugin (also see to capture additional metrics
* Plugin Name: Server Timing Extra
* Plugin URI:
* Description: Exposes additional Server-Timing metrics using the Performance Lab plugin's Server Timing API.
* Requires at least: 6.1
* Requires PHP: 5.6
* Version: 0.1.0
* Author: Felix Arntz
* Author URI:
nemishkor /
Last active February 10, 2023 20:53
Sony 10 II - Dual SIM (arm64) | Sailfish OS 4.5 | Android 11 | Open GApps pico installation script
set -e
felixarntz /
Last active February 23, 2024 11:04
Mini WordPress core server performance test suite

Mini WordPress core server performance test suite


This quick "mini test suite" allows you to easily collect server-side performance metrics for WordPress core development. It does so by utilizing the Server-Timing header.


  1. Paste the code from main.php into pretty much anywhere in WordPress core, e.g. into wp-includes/default-filters.php.
  2. Use code like the one in around any code or a specific function that you want to record metrics for.
devinsays / OrdersList.php
Created June 2, 2022 15:45
Speeds up the loading of /wp-admin/edit.php?post_type=shop_order and /wp-admin/edit.php?post_type=subscription.
namespace UniversalYums\Admin\Performance;
class OrdersList {
* The single instance of the class.
protected static $instance;
devinsays / delete-fraud-activity-by-ip.php
Created May 7, 2021 16:52
Deleted WooCommerce orders, subscriptions, and customers based on the IP address used to order.
* This script will delete all `on-hold` subscriptions and their orders and users.
* It will delete all subscriptions based on IP.
* wp eval-file delete-fraud-activity-by-ip.php
* Dry run:
* wp eval-file delete-fraud-activity-by-ip dry

⚠️ Warning: this document is out of date.

For the most recent webpack5 instructions see

Storybook experimental Webpack 5 support

Storybook 6.2 includes experimental Webpack 5 support. Webpack 5 brings a variety of performance improvements, as well as exciting new features like module federation. Here's a quick guide to get you going.


mcaskill / wp-ajax.php
Last active December 4, 2023 11:21 — forked from yllus/admin-ajax.php
WordPress : A drop-in replacement for admin-ajax.php that is optimized for visitor-only AJAX requests.
* WordPress Ajax Process Execution
* This file is a near-identical copy of {@see wp-admin/admin-ajax.php} from WordPress v6.3.0.
* Differences:
* 1. Constant `WP_ADMIN` is set to FALSE, by default.
* 2. WordPress action 'admin_init' is replaced with custom action 'ajax_init'.
* 4. Custom actions hooked on 'admin_init' are not executed.
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much