Alle Neu

user:thomas Gists erstellt von Nutzer

title:mygist Gists mit Titel

filename:myfile.txt Gists mit Dateinamen

extension:yml Gists mit Dateiendung

language:go Gists in Sprache

topic:homelab gists zum gegebenen Thema

Anmelden

Alle Neu Anmelden

Alle Gists

Neueste erstellt
Älteste erstellt
Neueste bearbeitet
Älteste bearbeitet
Malin's Avatar

Malin / install-proxmox.sh

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 # install Proxmox over Debian 12
2
3 curl -o /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg http://download.proxmox.com/debian/proxmox-release-bookworm.gpg
4 echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
5 apt update && apt full-upgrade -y && apt install proxmox-ve -y
Malin's Avatar

Malin / largest.sh

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 # find and sort largest directories
2
3 du -h /www --max-depth=1 | sort -rh
Malin's Avatar

Malin / qrh-custom.css

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 .col-1 { max-width: 50%!important}
2 .col-2 { max-width: 50%!important}
3
4 .woocommerce-page .cart-collaterals {
5 display: none;
6 }
7
8 .child-category {
9 color: #9C9C9C;
10 font-family: 'Roboto', sans-serif;
Malin's Avatar

Malin / install-cgi.sh

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 # from: https://stackoverflow.com/questions/6787579/error-installing-perl-cgi-module-from-cpan
2 # dependency for LP-MSH-Scanner
3
4 apt-get install libcgi-pm-perl
Malin's Avatar

Malin / filtered-cats-QRh.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 function your_theme_enqueue_scripts() {
2 wp_enqueue_script('jquery');
3 // Add here any other scripts you need to enqueue
4 }
5
6 add_action('wp_enqueue_scripts', 'your_theme_enqueue_scripts');
7
8 function load_filtered_cats() {
9 // Security check
10 if (!check_ajax_referer('load_cats_nonce', 'nonce', false)) {
Malin's Avatar

Malin / sale-flash-label.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 /* START Show sale flash label */
2 add_filter('woocommerce_sale_flash', 'ds_change_sale_text');
3 function ds_change_sale_text() {
4 return '<span class="onsale">Oferta!</span>';
5 }
6
7 /* END Show sale flash label */
Malin's Avatar

Malin / user-email-in-header.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 /* START Display user email in header */
2 function show_user_email_shortcode() {
3 if ( is_user_logged_in() ) {
4 $current_user = wp_get_current_user();
5 return $current_user->user_email;
6 } else {
7 return ''; // Return an empty string if the user is not logged in
8 }
9 }
10 add_shortcode('show_user_email', 'show_user_email_shortcode');
Malin's Avatar

Malin / brand-above-title-in-cart.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 /* START Display Brand above title in cart */
2 // Function to display child category above product title on cart page
3 function display_child_category_above_product_title_on_cart( $item_name, $cart_item, $cart_item_key ) {
4 // We attempt to check if $cart_item contains product details
5 if ( isset( $cart_item['product_id'] ) ) {
6 $product_id = $cart_item['product_id'];
7
8 // Get child categories of the product
9 $product_categories = get_the_terms( $product_id, 'product_cat' );
Malin's Avatar

Malin / unique-product-count-in-cart.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 /* START Unique product count in cart */
2 // Shortcode to display the number of unique products in the cart with styling
3 function display_unique_cart_product_count_styled() {
4 // Initialize an empty array to store unique product IDs
5 $unique_product_ids = array();
6
7 // Get the cart contents
8 $cart_contents = WC()->cart->get_cart();
9
10 // Loop through each item in the cart
Malin's Avatar

Malin / custom-add-to-cart-button.php

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 2 years ago
1 /* START custom add to cart button on home */
2 function custom_add_to_cart_button_with_icon() {
3 // Remove the default add to cart button
4 remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
5
6 // Add the new custom button
7 add_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart_with_icon', 10);
8 }
9
10 function woocommerce_template_loop_add_to_cart_with_icon() {
Neuer Älter

Powered by Opengist ⋅ Load: 495ms⋅

Deutsch
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文