This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/httpd/modsecurity.d/wordpress.conf | |
# This has to be global, cannot exist within a directory or location clause | |
SecAction phase:1,log,pass,initcol:ip=%{REMOTE_ADDR},initcol:user=%{REMOTE_ADDR},id:1 | |
<Location /wp-login.php> | |
# Setup brute force detection. | |
# React if block flag has been set. | |
SecRule user:bf_block "@gt 0" "deny,status:401,log,msg:'ip address blocked for 60 minutes, more than 15 login attempts in 3 minutes.',id:2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Fix homepage pagination | |
if ( get_query_var('paged') ) { | |
$paged = get_query_var('paged'); | |
} else if ( get_query_var('page') ) { | |
$paged = get_query_var('page'); | |
} else { | |
$paged = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery Validation plugin tests</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css"> | |
</head> | |
<body> | |
<form id="myform"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
position: relative; | |
min-height: 100%; | |
} | |
body { | |
margin: 0 0 100px; /* bottom = footer height */ | |
} | |
footer { | |
position: absolute; | |
left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample code from Paul Lewis | |
// Source: http://www.html5rocks.com/en/tutorials/speed/animations/ | |
var latestKnownScrollY = 0, | |
ticking = false; | |
function onScroll() { | |
latestKnownScrollY = window.scrollY; | |
requestTick(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Campaign Monitor - get campaign recipient totals</title> | |
<meta name="viewport" content="width=device-width"> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Use with bash 4.0+ | |
#========================================================================================== | |
# Original Script from Clemens Lang, neverpanic.de | |
# https://neverpanic.de/blog/2014/03/19/downloading-google-web-fonts-for-local-hosting/ | |
# Modified by Chris Jung, campino2k.de | |
# * Rename Files to be compatible with Windows File System (remove spaces and colon) | |
# * Add "local()" to src like Google does to skip downloading if System has font installed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Check for javascript support | |
(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement); | |
// Check for SVG support | |
(function(H){if(!!("createElementNS"in document&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)){H.className+=" svg"}else{H.className+=" no-svg"}})(document.documentElement); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// global.js | |
// Global debug logger | |
var debug = true, | |
log = function(s){ | |
if(debug) { | |
console.log(s); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Sample HTML --> | |
<div class="grid"> | |
<div class="grid__item grid-w1 grid-h1"></div> | |
<div class="grid__item grid-w1 grid-h2"></div> | |
<div class="grid__item grid-w2 grid-h2"></div> | |
<div class="grid__item grid-w4 grid-h3"></div> | |
</div> |