View terminal.txt
//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
View functions.php
<?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 );
}
View .htaccess
## 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
View .htaccess
# 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"
View gravity-forms-email-validator.php
<?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 <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/banlimit-email-domains-for-gravity-form-email-fields/
View gist:420b281aad513b54c237c287df01fc99
<?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 ) {
View extras.php
//Page Slug Body Class
function add_slug_body_class( $classes ) {
global $post;
#Post
if ( isset( $post ) ) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
#Ancestors
View credits.txt
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/
View test.js
(function($) {
$(document).on('facetwp-loaded', function() {
$('.facetwp-page.first-page').html('First');
$('.facetwp-page.last-page').html('Last');
});
})(jQuery);
View gulpfile.js
// 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'),