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
| //IMPORTANT - install this before: npm i child-process-promise --save-dev | |
| /* | |
| put this in your package.json script: | |
| "install-collection": "node install-collection.js" | |
| npm run install-collection <user>.<collection> | |
| */ | |
| /*jshint esversion: 6 */ | |
| const exec = require('child-process-promise').exec; |
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
| <?php | |
| function sanitize_phone( $phone, $international = false ) { | |
| $format = "/(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/"; | |
| $alt_format = '/^(\+\s*)?((0{0,2}1{1,3}[^\d]+)?\(?\s*([2-9][0-9]{2})\s*[^\d]?\s*([2-9][0-9]{2})\s*[^\d]?\s*([\d]{4})){1}(\s*([[:alpha:]#][^\d]*\d.*))?$/'; | |
| // Trim & Clean extension | |
| $phone = trim( $phone ); | |
| $phone = preg_replace( '/\s+(#|x|ext(ension)?)\.?:?\s*(\d+)/', ' ext \3', $phone ); |
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
| /* Track Downloads & Outbound Links in Google Analytics | |
| ******************************************************* */ | |
| if (typeof jQuery != 'undefined') { | |
| jQuery(document).ready(function($) { | |
| var filetypes = /\.(zip|pdf|doc|docx|xls|xlsx|ppt|pptx|mp3|mp4|txt|rar|wma|mov|avi|wmv|flv|wav|cfg|dwg|igs|par|rfa|sat|stp)$/i; | |
| var baseHref = ''; | |
| if (jQuery('base').attr('href') !== undefined) baseHref = jQuery('base').attr('href'); | |
| jQuery('a').on('click', function(event) { | |
| var el = jQuery(this); | |
| var track = 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
| @font-face { | |
| font-family: "Mission Gothic_Black Italic"; | |
| src: url("@{custom-font-url}Mission Gothic Black Italic_web.eot"); | |
| src: url("@{custom-font-url}Mission Gothic Black Italic_web.eot?#iefix") format("embedded-opentype"), | |
| url("@{custom-font-url}Mission Gothic Black Italic_web.woff") format("woff"), | |
| url("@{custom-font-url}Mission Gothic Black Italic_web.ttf") format("truetype"), | |
| url("@{custom-font-url}Mission Gothic Black Italic_web.svg#svgFontName") format("svg"); | |
| font-weight: normal; | |
| font-style: normal; | |
| } |
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
| // Should be used to modify the default spacing between objects (not between nodes of * the same object) | |
| // spacing helpers | |
| // p,m = padding,margin | |
| // a,t,r,b,l,h,v = all,top,right,bottom,left,horizontal,vertical | |
| // xs,s,m,l,n = extra-small(@xs),small(@s),medium(@m),large(@l),extra-large(@xl),none(0px) | |
| @xs: 5px; | |
| @s: 10px; | |
| @m: 20px; | |
| @l: 40px; | |
| @xl: 60px; |
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
| .vertical-align() { | |
| display: block; | |
| position: absolute; | |
| top: 50%; | |
| transform: perspective(1px) translateY(-50%); | |
| } | |
| .vertical-horizontal-align() { | |
| display: block; | |
| position: absolute; |
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
| // Breakpoint Variables | |
| // ------------------------- Source: http://blog.scur.pl/2012/06/variable-media-queries-less-css/ | |
| @highdensity: ~"only screen and (-webkit-min-device-pixel-ratio: 1.5)", | |
| ~"only screen and (min--moz-device-pixel-ratio: 1.5)", | |
| ~"only screen and (-o-min-device-pixel-ratio: 3/2)", | |
| ~"only screen and (min-device-pixel-ratio: 1.5)"; | |
| @mobile: ~"only screen and (max-width: 529px)"; | |
| @tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)"; | |
| @desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)"; | |
| @desktop-xl: ~"only screen and (min-width: 1129px)"; |
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
| UPDATE table SET field = REPLACE(field, 'oldstring', 'newstring'); |
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
| /** | |
| * Catch all internal links and smooth scroll on click | |
| */ | |
| $('a[href*="#"]:not([href="#"])').click(function() { | |
| if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { | |
| var target = $(this.hash), | |
| $this = $(this), | |
| offset = $this.data('offset') || 0, | |
| duration = $this.data('duration') || 0.8; |
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
| /** | |
| * Equal Heights | |
| */ | |
| var resizeElements = function(selector) { | |
| if (selector != '') { | |
| $(selector).each(function() { | |
| var maxHeight = 0; | |
| $(this).children().each(function() { | |
| if (maxHeight < $(this).height()) { |