Skip to content

Instantly share code, notes, and snippets.


Petr Chutný petrchutny

View GitHub Profile
petrchutny / Wordpress – Removing Dashboard Widgets.php
Last active July 28, 2017 09:25
Wordpress – Removing Dashboard Widgets
View Wordpress – Removing Dashboard Widgets.php
// Main column (left):
// Side Column (right):
// Then just use remove_meta_box( ) to remove these boxes
petrchutny / Enable Gzip Compression
Created July 16, 2017 15:45
Enabling Gzip compression via this code in .htaccess in the root of a website
View Enable Gzip Compression
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
petrchutny / Change Colour of Menu Button
Last active July 28, 2017 09:22
Menu button changing colour on scroll (jQuery)
View Change Colour of Menu Button
// Menu button changing colour on scroll
if($(".header").hasClass("white")) {
var button = $(' path')
var scrollPos = $(window).scrollTop(),
headerHeight = $('.hero-background').height();
if(scrollPos > headerHeight) {
button.css({fill : "#000000"});
} else {
button.css({fill : "#FFFFFF"});