This file contains hidden or 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
/** | |
* Add leading zeroes to an integer. | |
* @param {int} num The number to which to add leading zeros. | |
* @param {ing} zeros The length of the resulting string. | |
* @returns {str} | |
*/ | |
function addLeadingZeros(num, width) { | |
return String(Math.pow(10, width) + num).slice(-width) ; | |
} |
This file contains hidden or 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
# Add the following block to your WordPress .htaccess just above the section labeled 'BEGIN WordPress' | |
<IfModule mod_rewrite.c> | |
# Restrict login to my IP | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
# Your IP address goes below. Escape the dots with a backslash. | |
# Whitelist multiple IP addresses by copying and pasting the line below and | |
# changing the IP address to the one you want to whitelist. |
This file contains hidden or 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
# Select the rows to which you want the rule to apply | |
# Go to Format > Conditional Formatting | |
# Add a new formatting rule to the tool bar in the right-hand column | |
# Select 'Custom Formula' from the drop down | |
# Enter the formula below and modify the column name as needed | |
=(AND(NOT(INDIRECT("C" & ROW()) = ""), INDIRECT("C" & ROW()) = 0)) | |
# Select the formatting styles youw ant to apply |
This file contains hidden or 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
/** | |
* This script was taken from a discussion on Google Groups. | |
* I'm not taking credit for it but sharing it because it is very useful for splitting | |
* discontinuous absolute paths into continuous subpaths. Where this is particularly | |
* useful is for importing SVG files into applications like Figma, Sketch, InVision, XD, etc. | |
*/ | |
/** | |
* Split discontinuous absolute paths into continuous sub-paths. | |
* | |
* Example: |
This file contains hidden or 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
/** | |
* @see https://github.com/Adobe-CEP/Samples/blob/master/XmpSamplePanel/js/xmp_bridge.js | |
*/ | |
/* | |
* ADOBE SYSTEMS INCORPORATED | |
* Copyright 2014 Adobe Systems Incorporated | |
* All Rights Reserved. | |
* | |
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the |
This file contains hidden or 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
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 month" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/gif "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" | |
ExpiresByType text/x-javascript "access plus 1 month" |
This file contains hidden or 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
# The rules below allow you to A/B test any page on your site by splitting traffic to one of two | |
# sub-pages depending on the timestamp when they visit. If the millisecond is an even number, | |
# they are redirect to /a/ if the millisecond is odd they go to /b/. This ensures a statisticaly | |
# even split since the probability of the second being even or odd is about 50/50. | |
# | |
# You will need to create 3 sub-pages on your site: @, a, b so you'll end up with : | |
# | |
# https://yourdomain.com/@/any-page-name | |
# https://yourdomain.com/a/any-page-name | |
# https://yourdomain.com/b/any-page-name |
This file contains hidden or 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
#https?://(www.)?(MyDomain.com|MyInstall.wpengine.com|MyCDNcrazyness1234567890(.wpengine|-wpengine).netdna-(ssl|cdn).com)/(wp-content|wp-includes)# => https://MyCDNcrazyness1234567890-wpengine.netdna-ssl.com/$5 |
This file contains hidden or 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
{ | |
"multipass" : true, | |
"plugins": [ | |
{"removeTitle": false}, | |
{"cleanupAttrs": true}, | |
{"inlineStyles": {"onlyMatchedOnce": false}}, | |
{"removeDoctype": true}, | |
{"removeXMLProcInst": true}, | |
{"removeComments": true}, | |
{"removeMetadata": true}, |
This file contains hidden or 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
/** | |
* Group layers in Adobe Illustrator into sub-layers based on a substring | |
* of the layer names. For instance, given layers named with the pattern: | |
* 'Icon-set-01-some-keywords-here' | |
* Call: | |
* groupLayers('Icon-set-01'); | |
* | |
* The result will be to create a new parent layer named 'Icon-Set-01' and | |
* to group any layer whose name starts with 'Icon-Set-01' under that layer. | |
* @param nameStem |