Skip to content

Instantly share code, notes, and snippets.

View FrancoStino's full-sized avatar
🌞

Davide Ladisa FrancoStino

🌞
View GitHub Profile
@FrancoStino
FrancoStino / JetBrains trial reset.md
Created November 13, 2024 16:57 — forked from h3ssan/JetBrains trial reset.md
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@FrancoStino
FrancoStino / git-export.md
Created July 29, 2024 14:19 — forked from vanquang9387/git-export.md
git: export diff files between 2 branches/commits

We can get list of changed files between 2 branches/commits by

$ tar --ignore-failed-read -vczf archive.tgz $(git diff --name-only --diff-filter=ACMRT master develop)

Let's see important part:

  1. git diff master develop:
    Get differences between master and develop branches.
@FrancoStino
FrancoStino / functions.php
Created October 10, 2023 21:31 — forked from Zodiac1978/functions.php
Remove events from a specified event category in "The Events Calendar" by Modern Tribe
<?php
/**
* The Events Calendar Remove Events from Month and List Views
*
* @param [object] $query Query of the events page.
* @return [object] Modified Query
*/
function tribe_exclude_events_category_month_list( $query ) {
if ( isset( $query->query_vars['eventDisplay'] ) && ! is_singular( 'tribe_events' ) ) {
@FrancoStino
FrancoStino / hide_plugins_from_the_word_press_admin_plugin_list.php
Last active October 5, 2023 14:44 — forked from shahzaibkhan/functions.php
Hide plugins from the WordPress Admin plugin list
<?php
add_filter(
'all_plugins',
function ( $plugins ) {
$shouldHide = ! array_key_exists( 'show_all', $_GET );
if ( $shouldHide ) {
@FrancoStino
FrancoStino / gforms-merge-tag.php
Last active July 20, 2023 13:50 — forked from hereswhatidid/gforms-merge-tag.php
Create a custom Gravity Forms merge tag
<?php
/**
* Add custom merge tag to the merge tags drop down in the form editor
*
* @param array $merge_tags
* @param int $form_id
* @param array $fields
* @param int $element_id
*
* @return array
@FrancoStino
FrancoStino / woocommerce-update-prices.sql
Last active September 16, 2023 09:26 — forked from yanknudtskov/woocommerce-update-prices.sql
Queries for updating all prices including variations in WooCommerceIn this instance all prices are subtracted 20% (0.8)#woocommerce #mysql
-- Queste query SQL aggiornano tutti i prezzi, comprese le variazioni, in WooCommerce.
-- In questo caso, tutti i prezzi vengono scontati del 20% (moltiplicati per 0.8).
-- Aggiorna il prezzo regolare se il valore esiste e la chiave meta è '_regular_price'.
UPDATE wpjd_postmeta SET meta_value = meta_value * 0.8 WHERE meta_key = '_regular_price' AND meta_value != '';
-- Aggiorna il prezzo in offerta se il valore esiste e la chiave meta è '_sale_price'.
UPDATE wpjd_postmeta SET meta_value = meta_value * 0.8 WHERE meta_key = '_sale_price' AND meta_value != '';
-- Aggiorna il prezzo se il valore esiste e la chiave meta è '_price'.
@FrancoStino
FrancoStino / sorting_in_variations_dropdown.php
Last active September 21, 2024 10:03 — forked from qzya/sorting_in_variations_dropdown.php
[Sort product attributes in variations dropdown on single page by backend variations order ] #wp #woocommerce #products #product_attributes #sorting #terms #variations
<?php
// Aggiungi un filtro per modificare l'HTML del menu a tendina per le opzioni di variazione degli attributi
add_filter('woocommerce_dropdown_variation_attribute_options_html', 'wc_dropdown_variation_attribute_options_sorted', 20, 2);
// Funzione per ordinare le opzioni di variazione degli attributi
function wc_dropdown_variation_attribute_options_sorted( $html, $args ) {
// Analizza gli argomenti con i valori predefiniti
$args = wp_parse_args(
apply_filters( 'woocommerce_dropdown_variation_attribute_options_args', $args ),
@FrancoStino
FrancoStino / generate-keystore-android.md
Created February 23, 2022 09:35 — forked from WendySanarwanto/generate-keystore-android.md
How To Generate Keystore in Android

You can generate the debug keystore by running this command in the android/app/ directory: keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000