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
| /** | |
| * Clearing cache | |
| * Inside the bin dir run command | |
| */ | |
| php magento cache:flush |
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
| /** | |
| * Clearing cache | |
| * Inside the bin dir run command | |
| */ | |
| php magento cache:flush |
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
| /* | |
| * A CSS class to protect content from user copy and user selection | |
| */ | |
| .nocopy { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -khtml-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; |
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
| # Initialize git | |
| git init | |
| # Add remote repo | |
| git remote add origin [ADDRESS OF REPO] | |
| # Verify remote repo | |
| git remote -v |
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
| /* | |
| * Detect element if in viewport | |
| * returns bolean | |
| */ | |
| $.fn.isInViewport = function() { | |
| var elementTop = $(this).offset().top | |
| var elementBottom = elementTop + $(this).outerHeight() | |
| var viewportTop = $(window).scrollTop() | |
| var viewportBottom = viewportTop + $(window).height() |
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
| /* | |
| * Detect scroll direction | |
| */ | |
| // Scrolling logic | |
| window.addEventListener(`scroll`, (e)=>{ | |
| // print "false" if direction is down and "true" if up | |
| console.log(window.oldScroll > window.scrollY); | |
| window.oldScroll = window.scrollY; | |
| }); |
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
| /* | |
| * Checking dynamically if bottom if reach via scrolling | |
| */ | |
| $(window).scroll(()=>{ | |
| // Bottom reach | |
| if ($(window).scrollTop() == $(document).height() - $(window).height()) { | |
| console.log("Bottom reached") | |
| } | |
| }) |
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
| <!-- | |
| - Just add "user-scalable=no" inside your viewport content meta | |
| --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> |
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
| /* | |
| * Using Bootstrap 4 Alpha | |
| * Issue: wanted to remove the on :focus blue outline color | |
| * Solution: It looks like it is not css outline but border color on class .form-control, copying default border color on inputs- | |
| * (rgba(0,0,0,.15)) | |
| */ | |
| /* removing outline on form inputs */ | |
| .form-control:focus { | |
| border-color: rgba(0, 0, 0, .15); |
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
| /* | |
| * USAGE: | |
| * convertImgToBase64URL(IMAGE_URL, base64Img => { | |
| * console.log("Converted image: ", base64Img) | |
| * }) | |
| */ | |
| convertImgToBase64URL(url, callback, outputFormat){ | |
| var img = new Image(); |