Skip to content

Instantly share code, notes, and snippets.

@Akira13641
Akira13641 / ManagedObject.pas
Last active October 3, 2020 00:30
Simple smart pointers in modern Object Pascal (as Free Pascal implements it)
// This unit uses record types in conjunction with record "management operators" to implement
// (pretty basic) smart pointers specifically for class types.
unit ManagedObject;
// ↓↓↓ this just enables Free Pascal's Delphi-syntax compatibility mode
{$mode Delphi}{$H+}
{$Assertions On}
interface
@maddisondesigns
maddisondesigns / functions.php
Last active January 24, 2023 20:44
Hide those annoying Automattic/WooCommerce/Jetpack/WordPress adverts & promos
<?php
/**
* Turn off WooCommerce Marketplace suggestions
*/
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' );
/**
* Turn off WooCommerce Feature Plugin notice
*/
add_filter( 'woocommerce_show_admin_notice', '__return_false', 'wc_admin_feature_plugin_notice' );