Skip to content

Instantly share code, notes, and snippets.

@zorem
zorem / exclude-country.php
Last active May 1, 2023 15:16
filter in the checkout validation for exclude country from dropdown
<?php
// Checkout Validation exclude country
add_filter('checkout_validation_exclude_country', 'checkout_validation_exclude_country');
function checkout_validation_exclude_country(){
return array('US');
}
@WpComet
WpComet / gist:4a802a56817448e3dd425b2efcad294f
Created September 17, 2021 10:03
Making woocommerce product gallery autoplay
add_filter( 'woocommerce_single_product_carousel_options', 'filter_single_product_carousel_options' );
function filter_single_product_carousel_options( $options ) {
    $options['slideshow'] = true;
    $options['animationLoop'] = true;
    $options['slideshowSpeed'] = 3000;
    return $options;
}
@isaumya
isaumya / remove-woocommerce-bloat-marketing-hub.md
Last active April 30, 2024 12:26
Easily Remove WooCommerce Bloated Features like Marketing Hub from WordPress Admin Menu

Remove WooCommerce Bloated Features from WP Admin Menu

Recently WooCommerce has added a lot of improvements to the plugin which we really appriciate but at the same time a lot of bloated features has alos been added to the plugin like Marketing Hub, a completely useless menu taking extra space among the other important menu items. Now if you find Marketing Hub to be useful, you can keep it.

But just in case you are looking for a way to remove these features that you no longer need from your WordPress Admin menus, take a look at the following code snippets. Please note: though I will show you how you can remove the Marketing Hub from your WP Admin menu list completely and make sure WooCommerce doesn't execute codes for that feature you don't need, you can do the same for other WooCommerce features as well like Analytics.

How to remove Marketing Hub for WooCommerce <= v4.2

If you are using WooCommerce <= v4.2, you can simple add this one line of code in your theme's functions.php f

@LayZeeDK
LayZeeDK / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Last active May 7, 2024 13:45
Angular CLI, Angular, Node.js, TypeScript, and RxJS version compatibility matrix. Officially part of the Angular documentation as of 2023-04-19 https://angular.io/guide/versions
Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.5 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.3.0 ~14.3.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.1.3 ~14.1.3 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~14.0.7 ~14.0.7 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~13.3.0 ~13.3.0 ^12.20.2 || ^14.15.0 || ^16.10.0 >=4.4.4 <4.7.0 ^6.5.5 || ^7.4.0
@ozh
ozh / Facebook-xoxo-Congrats.md
Last active June 22, 2022 16:32
Facebook Congrats & Kisses animations

Hearts & kisses :

  • xo
  • xoxo
  • xoxoxo
  • Besos y abrazos
  • bisou
  • bisous
  • baci
  • 꽁냥꽁냥
@mcblum
mcblum / gist:ffdc8e37a9901f82970136ec9408cb5b
Created September 26, 2016 17:35
.htaccess config for Angular
#Angular rewrites
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# If the requested pattern is file and file doesn't exist, send 404.
# This fixes the issue with Angular being included more than once
# when you get the path of a component template wrong.
RewriteCond %{REQUEST_URI} ^(\/[a-z_\-\s0-9\.]+)+\.[a-zA-Z]{2,4}$
@runspired
runspired / form.html
Created May 23, 2016 13:46
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@MLWALK3R
MLWALK3R / netspeed.sh
Last active October 6, 2018 22:11 — forked from rsvp/netspeed.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-09
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, westm, rbx, sbg, bhs URL]
# Default server is RBX FR.
# First try it out without any arguments.
#
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@marteinn
marteinn / volley-timeout.java
Created July 1, 2014 19:15
Android Volley Samples: Catching a timeout error.
import com.android.volley.TimeoutError;
import com.android.volley.VolleyError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.toolbox.JsonObjectRequest;
import org.json.JSONObject;
Response.Listener<JSONObject> successListener = new Response.Listener<JSONObject>() {