Skip to content

Instantly share code, notes, and snippets.

View LeonardoGandini's full-sized avatar
🎯
Focusing

Leonardo Gandini LeonardoGandini

🎯
Focusing
View GitHub Profile
@BurlesonBrad
BurlesonBrad / functions.php
Created March 10, 2016 21:34 — forked from TimBHowe/functions.php
Reduce or remove WooCommerce 2.5 minimum password strength requirement for creating a user account. Warning: Use at your own risk.
<?php
/**
*Reduce the strength requirement on the woocommerce password.
*
* Strength Settings
* 3 = Strong (default)
* 2 = Medium
* 1 = Weak
* 0 = Very Weak / Anything
*/
@haydenbbickerton
haydenbbickerton / functions.php
Created December 3, 2015 18:14
Wordpress The7 with Yoast Breadcrumbs
if (function_exists('yoast_breadcrumb'))
{
function yoastBreadcrumbs()
{
// The start/end html is theme-specific.
return yoast_breadcrumb('<div class="wf-td"><div class="breadcrumbs text-normal" id="breadcrumbs">', '</div></div>', false);
}
// Override the theme's function for making breadcrumbs.
// This is for 'The7' theme, the name of the function is theme-specific.
@mfdj
mfdj / .htaccess
Last active August 29, 2015 14:00
Adding HSTS headers to all responses when using php-fpm + mod_fastcgi using basic php or Symfony2
# add HTTP Strict Transport Security (HSTS) header to all *non-php* responses
# - mod_fastcgi apparently ignores mod_headers?
# - see: https://www.owasp.org/index.php/HTTP_Strict_Transport_Security
Header set Strict-Transport-Security "max-age=7776000"
@srikat
srikat / parallax.js
Last active April 9, 2019 16:23
Applying Parallax effect from Parallax Pro in any Genesis theme. http://sridharkatakam.com/apply-parallax-effect-parallax-pro-genesis-theme/
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'parallax-section-below-header',
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ),
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ),
) );
genesis_register_sidebar( array(
'id' => 'parallax-section-above-footer',
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ),
@spivurno
spivurno / gw-gravity-forms-map-fields-to-field.php
Last active May 22, 2023 17:27
Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
<?php
/**
* Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
*
* Usage
*
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated.
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field.
*
* Basic Fields
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
@WebEndevSnippets
WebEndevSnippets / functions.php
Created November 13, 2012 16:30
WooCommerce: Change Order Notes Placeholder Text
add_filter( 'woocommerce_checkout_fields', 'webendev_woocommerce_checkout_fields' );
/**
* Change Order Notes Placeholder Text - WooCommerce
*
*/
function webendev_woocommerce_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder';
return $fields;
}
@mhulse
mhulse / Amazon S3 snippets and Transmit FTP cloud settings.md
Last active February 21, 2021 18:36
Amazon S3 snippets... Transmit FTP cloud settings... Other related goodies...

S3 Website "Index Document"

index.html:

<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1