Skip to content

Instantly share code, notes, and snippets.

View jayontraps's full-sized avatar

Jason Righelato jayontraps

  • London, UK
View GitHub Profile
# Block the include-only files.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Backbone.js Tutorial</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script src="http://documentcloud.github.com/backbone/backbone-min.js"></script>
@jayontraps
jayontraps / js : matchMedia template
Created August 27, 2014 10:01
matchMedia template
var media_query = window.matchMedia("(min-width: 768px)");
media_query.addListener(my_function);
my_function(media_query);
function my_function(media_query) {
if (media_query.matches) {
// Do stuff..
} else {
// Do stuff..
}
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
@mixin hover-focus-active() {
&:hover,
&:focus,
&:active { @content }
}
// css
/*
#backToTop {
position: fixed;
bottom: 30px;
right: 30px;
}
*/
$("#backToTop").hide();
(function() {
var api = {},
$response = $('#response');
$('#ajaxForm').bind('submit', function(event) {
event.preventDefault();
var search = $('#title').val();
(function($) {
$.fn.checkConditions = function(options) {
var settings = $.extend({
'breakpoint': '800'
},
options);
var $this = $(this);
var resizer = function() {
<meta name="robots" content="noindex, nofollow">
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon(s) in the root directory -->