Skip to content

Instantly share code, notes, and snippets.

@stingray82
stingray82 / freemius-killer.php
Created November 30, 2024 21:10 — forked from KZeni/freemius-killer.php
Freemius Killer: A WordPress plugin that keeps your site lightweight by preventing the Freemius middleware from ever coming into play. Best when running Freemius' own "Freemius Fixer" plugin while this is enabled to purge existing Freemius data while this keeps it away. *NOTE:* This plugin manually specifies the plugins that use Freemius to then…
<?php
// REQUIRED: Make sure to edit the last few lines to assign the global variable that any particular Freemius/FS-enabled plugin wants to use to have this intercept it (if not already included below.)
// Please, any revisions for **adding more plugin to be supported by default** and/or better accommodating things are welcome at: https://gist.github.com/KZeni/7afbd8b9a94c23aa0a9133d4ce767d0b
// One would like to think this could grow to automatically intercept all plugins trying to use Freemius, but manual editing & updating a gist (maybe eventually getting to the point of being a plugin with automatic updates [be it via a WP.org plugin listing, its own built-in updater like PUM, GitHub repo where sites have plugins check a repo for new releases, etc.])
// Based on: https://gist.github.com/thefrosty/d9bb001c05a407ba1aaa60c8b75aeb43 (via https://austin.passy.co/2024/disable-freemius-in-wordpress-plugins/)
declare(strict_types=1);
/**
* Create an override function, as to bypass Freemius in plugins that in
@stingray82
stingray82 / freemius.php
Created November 30, 2024 21:10 — forked from thefrosty/freemius.php
Create an override function, as to bypass Freemius in some less than smart plugins.
<?php
declare(strict_types=1);
/**
* Create an override function, as to bypass Freemius in stupid plugins.
* @wordpress-muplugin
* Plugin Name: Freemius Killer
* Description: Global override for Freemius' "loader".
* Version: 1.0.0
@stingray82
stingray82 / wpe-framework.scss
Created December 19, 2023 18:49 — forked from wpeasy/wpe-framework.scss
WPE Framwork
/*###############################
SCSS VARIABLES
################################*/
$one-rem-in-px: 10px;
$clamp-vp-min: 480px;
$clamp-vp-max: 1600px;
$use-fluid-size: "on";
$use-fluid-headings: "on";
$use-fluid-text: "on";
@stingray82
stingray82 / add-wpcli.sh
Created August 9, 2022 19:51 — forked from ladislavsulc/add-wpcli.sh
Add WP CLI to Laragon
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat
@stingray82
stingray82 / install-wordpress.sh
Created August 9, 2022 19:29 — forked from dessibelle/install-wordpress.sh
Shell script: WordPress install script
#!/usr/bin/env bash
# == ABOUT ==
# Gets localized version of WordPress and plugins from svn, sets up wp-config.php
# and creates database, downloads some standard components from github (and local
# git server) and runs theme template setup.
# == INSTALLATION ==
#
# Install script: git clone git://gist.github.com/2666478.git tmp.$$; sudo mv tmp.$$/install-wordpress.sh /usr/bin/; chmod 755 /usr/bin/install-wordpress.sh; rm -rf tmp.$$/;
@stingray82
stingray82 / gist:a83cb15f49b4c468f3e51815dcc3bd65
Created October 2, 2019 18:27 — forked from kelvinn/gist:512f72bf1015047af945
Recursively Change Line Endings (Windows)
REM On Unix you would do this: find ./ -type f -exec dos2unix {} \;
REM After installing dos2unix.exe in Windows, you can create a small bat script with the below in it to
REM recursively change the line endings. Careful if you have any hidden directories (e.g. .git)
for /f "tokens=* delims=" %%a in ('dir "C:\Users\username\path\to\directory" /s /b') do (
"C:\Program Files\unix2dos.exe" %%a
)