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
//Autohide Dock Speed | |
$ defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -float 0.5 | |
$ killall Dock | |
//Add spacers to your Dock | |
$ defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
$ killall Dock | |
//Changing screenshots from the default png to jpg format | |
$ defaults write com.apple.screencapture type jpg |
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 | |
//Defer parsing of JS to speed up loading pages | |
if (!(is_admin() )) { | |
function defer_parsing_of_js ( $url ) { | |
if ( FALSE === strpos( $url, '.js' ) ) return $url; | |
if ( strpos( $url, 'jquery.js' ) ) return $url; //excluding js file | |
return "$url' defer='defer"; | |
} | |
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 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
## BEGIN GZIP Compression ## | |
<IfModule mod_deflate.c> | |
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 |
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
# Cache-Control - HTTP headers for static resources | |
<IfModule mod_headers.c> | |
# One year for image and video files | |
<filesMatch ".(jpg|jpeg|png|gif|ico|mp4|webm)$"> | |
Header set Cache-Control "max-age=31536000, public" | |
</filesMatch> | |
# One month for css and js | |
<filesMatch ".(css|js)$"> | |
Header set Cache-Control "max-age=2628000, public" |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Email Domain Validator | |
* | |
* This snippets allows you to exclude a list of invalid domains or include a list of valid domains for your Gravity Form Email fields. | |
* | |
* @version 1.4 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/banlimit-email-domains-for-gravity-form-email-fields/ |
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 | |
function custom_facetwp_pager( $output, $params ) { | |
$output = ''; | |
$page = (int) $params['page']; | |
$total_pages = (int) $params['total_pages']; | |
// Only show pagination when > 1 page | |
if ( 1 < $total_pages ) { |
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
//Page Slug Body Class | |
function add_slug_body_class( $classes ) { | |
global $post; | |
#Post | |
if ( isset( $post ) ) { | |
$classes[] = $post->post_type . '-' . $post->post_name; | |
} | |
#Ancestors |
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
How tabs should work by | |
https://remysharp.com/2016/12/11/how-tabs-should-work | |
- Navigable available without JavaScript | |
- Anchor links that are, clickable, have block layout, have their href pointing to the id of the panel element, uses correct cursor (ie. cursor: pointer). | |
- Since tabs are clickable, the user can open in a new tab/window and the page correctly loads with the right tab open. | |
- Right clicking (and shift-clicking) doesn't cause the tab to be selected. | |
- Browser native back/forward button correctly changes the state of the selected tab (think - about it working exactly as if there was no JavaScript in place). | |
Final version: http://output.jsbin.com/lorovu/ |
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
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
$('.facetwp-page.first-page').html('First'); | |
$('.facetwp-page.last-page').html('Last'); | |
}); | |
})(jQuery); |
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
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
imagemin = require('gulp-imagemin'), | |
rename = require('gulp-rename'), | |
clean = require('gulp-clean'), |
NewerOlder