Skip to content

Instantly share code, notes, and snippets.

@i-Tom
i-Tom / extend-trial-jetbrains-windows.bat
Created October 1, 2024 06:12 — forked from rjescobar/extend-trial-jetbrains-windows.bat
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@i-Tom
i-Tom / free-database-hosting.md
Created September 25, 2024 06:01 — forked from bmaupin/free-database-hosting.md
Free database hosting
@i-Tom
i-Tom / Exclude groups
Created August 6, 2024 08:04 — forked from lukecav/Exclude groups
Groups to exclude in Redis object caching for LearnDash
comment
counts
plugins
learndash_reports
learndash_admin_profile
wc_session_id
@i-Tom
i-Tom / elementor_activator.php
Created June 14, 2024 08:54 — forked from lupetalo/elementor_activator.php
Elementor Activator
<?php
/**
* Plugin Name: Elementor Activation
* Description: Activates Elementor Pro - Not everybody have shell acces to run WP CLI or desire for eveybody to see license key. Manual activation is needed, and since Elementor wont add this, community will :)
* Plugin URI: https://github.com/elementor/elementor/issues/8667
* Gist Plugin URI: https://gist.github.com/lupetalo/38e6d40b620b7da976c42c2d207c674a
* Version: 1.3
*/
add_filter('pre_http_request', function($request, $request_params, $url){
if (strpos($url, 'my.elementor.com/api/v2/license/')!==false){
@i-Tom
i-Tom / Visual Studio 2022 Product Key
Created May 21, 2024 05:54 — forked from pablotolentino/Visual Studio 2022 Product Key
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
/**
* Returns an string clean of UTF8 characters. It will convert them to a similar ASCII character
* www.unexpectedit.com
*/
function cleanString($text) {
// 1) convert á ô => a o
$text = preg_replace("/[áàâãªä]/u","a",$text);
$text = preg_replace("/[ÁÀÂÃÄ]/u","A",$text);
$text = preg_replace("/[ÍÌÎÏ]/u","I",$text);
$text = preg_replace("/[íìîï]/u","i",$text);
@i-Tom
i-Tom / gist:9c75fa3ae20f8407f3f92b05a3732f25
Created April 30, 2021 07:34 — forked from kgaughan/gist:4492913
UTF-8 to ASCII transliteration in PHP (for, say, accent removal)
<?php
$ascii = iconv('utf8', 'ascii//TRANSLIT', $utf8)
@i-Tom
i-Tom / wp-remove-default-image-sizes.php
Created April 2, 2021 09:40 — forked from iftee/wp-remove-default-image-sizes.php
Custom filter to remove default image sizes (WordPress and WooCommerce) from your theme.
<?php
/*
* Custom filter to remove default image sizes from WordPress.
*/
/* Add the following code in the theme's functions.php and disable any unset function as required */
function remove_default_image_sizes( $sizes ) {
/* Default WordPress */
unset( $sizes[ 'thumbnail' ]); // Remove Thumbnail (150 x 150 hard cropped)
@i-Tom
i-Tom / wc-regenerate-and-notify.php
Created February 2, 2021 11:24 — forked from bdaley/wc-regenerate-and-notify.php
Adds an action to the order page that allows you to regenerate download permissions AND extends the expiration date for WooCommerce downloads.
<?php
add_filter('woocommerce_order_actions', 'wc_regenerate_and_notify_custom_order_action');
function wc_regenerate_and_notify_custom_order_action( $actions ) {
// Remove the woocommerce option to regenerate to avoid confusion
unset($actions['regenerate_download_permissions']);
// Add our new action (executed below)
$actions['wc_regenerate_and_notify'] = __('Regenerate permissions & send link to customer', 'wc-regenerate-and-notify');
return $actions;
@i-Tom
i-Tom / wc-defer-order-emails.php
Created December 18, 2020 12:19 — forked from damiencarbery/wc-defer-order-emails.php
Defer WooCommerce emails for a few minutes - Defer WooCommerce emails for a specified time after the normal delivery time. https://www.damiencarbery.com/2020/04/defer-woocommerce-emails-for-a-few-minutes/
<?php
/*
Plugin Name: Defer WooCommerce emails for a few minutes
Plugin URI: https://www.damiencarbery.com/2020/04/defer-woocommerce-emails-for-a-few-minutes/
Description: Defer WooCommerce emails for a specified time after the normal delivery time.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.5
*/