Skip to content

Instantly share code, notes, and snippets.

View pixelbart's full-sized avatar
🫥
Hidden

Kevin Pliester pixelbart

🫥
Hidden
View GitHub Profile
@hlashbrooke
hlashbrooke / function.php
Last active July 4, 2022 21:35
WordPress: Display posts in a random order, but retain persistent pagination
<?php
session_start();
add_filter( 'posts_orderby', 'randomise_with_pagination' );
function randomise_with_pagination( $orderby ) {
if( is_front_page() ) {
// Reset seed on load of initial archive page
@opnchaudhary
opnchaudhary / gmaps_3.html
Created July 5, 2013 04:26
Get latitude and longitude from google maps
<!doctyp html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Get Latitude and Longitude</title>
<script src="http://maps.google.com/maps/api/js?libraries=places&region=uk&language=en&sensor=true"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
</head>
<body>
@Zodiac1978
Zodiac1978 / .htaccess
Last active May 2, 2026 22:53
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/
anonymous
anonymous / .htaccess
Created July 3, 2012 08:32
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 2 hours "
ExpiresByType text/xml "access plus 2 hours"
ExpiresByType image/gif "access plus 3 weeks"
ExpiresByType image/jpg "access plus 2 weeks"
ExpiresByType image/png "access plus 3 weeks"
ExpiresByType video/quicktime "access plus 2 months"
ExpiresByType audio/mpeg "access plus 2 months"
ExpiresByType application/pdf "access plus 2 weeks"