Skip to content

Instantly share code, notes, and snippets.

@Zodiac1978
Zodiac1978 / .htaccess
Last active March 15, 2024 08:29
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/
@bhubbard
bhubbard / wp-config-local-sample.php
Last active October 26, 2023 02:50
This is my Template for a wp-config file.
<?php
################################################################################
// Custom WordPress Local Config
// Use only for Development
// https://gist.github.com/bhubbard/8428583
################################################################################
/* Database Connection Info */
define('DB_NAME', '');
define('DB_USER', '');
@andrasguseo
andrasguseo / show-event-details-on-cart.php
Last active July 4, 2023 07:31
Show event title and date on WooCommerce cart page
<?php
/* The snippet shows the event title and event start date on the WooCommerce cart page
* Done with the help of @Rachel ;)
*/
add_filter( 'woocommerce_cart_item_name', 'example_testing', 10, 3 );
function example_testing( $title, $values, $cart_item_key ) {
$ticket_meta = get_post_meta( $values['product_id'] );
$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] );
// *******************************
// Make Gutenberg Sidebar Wider / Fluid
// -------------------------------
function wider_gutenberg_settings_sidebar() { ?>
<style>
@media (min-width: 1080px) {
#wpwrap .edit-post-layout.is-sidebar-opened .components-notice-list {
right: 26vw !important;
}
#wpwrap .edit-post-layout.is-sidebar-opened .edit-post-plugin-sidebar__sidebar-layout,
@zackpyle
zackpyle / fluid-typography.css
Last active November 16, 2023 09:42
Fluid Typography
:root {
--ff-heading: 'Playfair Display', serif;
--ff-text: 'Source Sans Pro', sans-serif;
--fs-h1: clamp(40px, 6.0vw + 10px, 85px);
--fs-h2: clamp(30px, 1.7vw + 23px, 45px);
--fs-h3: clamp(25px, 1.3vw + 18px, 35px);
--fs-h4: clamp(20px, 1vw + 15px, 28px);
--fs-h5: clamp(16px, 0.9vw + 12px, 22px);