Skip to content

Instantly share code, notes, and snippets.

@simonlk
simonlk / Woocommerce - change paypal icon
Created November 28, 2012 00:41 — forked from mikejolley/gist:1425282
This snippet lets you edit the icon for the PayPal gateway in WooCommerce.
// Change the paypal icon
add_filter('woocommerce_paypal_icon', 'custom_woocommerce_paypal_icon');
function custom_woocommerce_paypal_icon( $url ) {
$url = get_bloginfo('template_url')."/assets/img/payment-icons.png";
return $url;
}
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@harthur
harthur / snippet.md
Created June 18, 2012 22:12
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }
 }