This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # recover-composer-json.sh | |
| # Recover composer.json from composer.lock + vendor packages | |
| # Automatically sets "name" from folder name in vendor/package format | |
| # Supports exact versions or version ranges via one boolean argument | |
| # Safely handles existing composer.json | |
| # Adds mode info in description | |
| # Skips vendor scan if folder missing | |
| # Requirements: jq, GNU sed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Delete all transients from the database whose keys have a specific prefix. | |
| * | |
| * @param string $prefix The prefix. Example: 'my_cool_transient_'. | |
| */ | |
| function delete_transients_with_prefix( $prefix ) { | |
| foreach ( get_transient_keys_with_prefix( $prefix ) as $key ) { | |
| delete_transient( $key ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KFZUS-F3JGV-T95Y7-BXGAS-5NHHP | |
| T3ZWQ-P2738-3FJWS-YE7HT-6NA3K | |
| KFZUS-F3JGV-T95Y7-BXGAS-5NHHP | |
| 65Z2L-P36BY-YWJYC-TMJZL-YDZ2S | |
| SFZHH-2Y246-Z483L-EU92B-LNYUA | |
| GSZVS-5W4WA-T9F2E-L3XUX-68473 | |
| FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS | |
| Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4 | |
| DAZPH-G39D3-R4QY7-9PVAY-VQ6BU | |
| KLZ5G-X37YY-65ZYN-EUSV7-WPPBS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| comment | |
| counts | |
| plugins | |
| learndash_reports | |
| learndash_admin_profile | |
| wc_session_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Visual Studio 2022 | |
| Enterprise : | |
| VHF9H-NXBBB-638P6-6JHCY-88JWH | |
| Professional: | |
| TD244-P4NB7-YQ6XK-Y8MMM-YWV2J |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $ascii = iconv('utf8', 'ascii//TRANSLIT', $utf8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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) |
NewerOlder