Skip to content

Instantly share code, notes, and snippets.

@illycz
illycz / SassMeister-input.scss
Created June 18, 2014 20:34
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// When we give an element some ‘attention’.
@mixin attention() {
&:hover,
&:active,
@illycz
illycz / .htaccess
Last active August 29, 2015 14:03
.htaccess DEFLATE
# compress your website (http://www.smashingmagazine.com/2014/06/25/how-to-speed-up-your-wordpress-website/)
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
@illycz
illycz / .htaccess
Last active October 3, 2018 15:43
.htaccess keep-alive
# enable keep alive (http://www.smashingmagazine.com/2014/06/25/how-to-speed-up-your-wordpress-website/)
Header set Connection keep-alive
@illycz
illycz / gist:4bdc53197ff7f54cf6e5
Created July 1, 2014 11:49
Performance Wordpress Checklist
0. RESOURCES
http://www.smashingmagazine.com/2014/06/25/how-to-speed-up-your-wordpress-website/
1. IDENTIFY PLUGINS THAT ARE SLOWING YOU DOWN
https://wordpress.org/plugins/p3-profiler/
2. COMPRESS YOUR WEBSITE
http://checkgzipcompression.com/
https://gist.github.com/illycz/1b896273dfd4cf26d184
@illycz
illycz / .htaccess
Created July 4, 2014 08:59
Instalace ve složce Wordpress
# CUSTOM / Disable rewrite for custom folder
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/blog
</IfModule>
@illycz
illycz / doc.md
Last active August 29, 2015 14:03
Dokumentace pluginu WordPress SEO by Yoast

Standardní nastavení WordPress

Trvalé odkazy

  • nastavit ve většině případů trvalé odkazy na formát /%postname%/

WWW a bez-WWW

  • vyřešit 301 přesměrování jedné varianty na druhou
  • nastavit preferovanou doménu ve webmaster tools

WordPress SEO plugin

The simplest way to have PNG fallback for browsers without SVG support:
<img src="logo.svg" onerror="this.onerror=null;this.src='logo.png'">
@illycz
illycz / gist:0da5f8053a041ffeb825
Created October 18, 2014 15:50
Animace načítání referencí
http://www.studionaam.com/
$elements = $('.image');
$elements.each(function(i, e) {
$(window).scrollTop() + $(window).height() > $(this).offset().top + 100 ? $(this).addClass("inview") : $(this).removeClass("inview");
});
$(window).scroll(function () {
$elements = $('.image');
$elements.each(function(i, e) {
@illycz
illycz / gist:c9c4878a27c5938199ec
Created December 16, 2014 11:48
Remove content permissions metabox added by Members plugin.
/**
* Remove content permissions metabox added by Members plugin.
*/
function prefix_remove_members_metabox() {
remove_meta_box( 'content-permissions-meta-box', 'post', 'advanced' );
remove_meta_box( 'content-permissions-meta-box', 'page', 'advanced' );
}
add_action( 'add_meta_boxes' , 'prefix_remove_members_metabox', 9999 );
import c from "classnames"
import s from "./index"
export const padding = (...args) => {
const [[a, b, c, d], mq] = args
if (mq) {
return c(
s.padding(a + b + c + d, mq),
)