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 beauty of how modern browsers works in simple steps. | |
| - Loading resources (img, external css/js, etc). | |
| - Parsing the HTML. | |
| - Creating the DOM Tree (nodes, etc). | |
| - Creating the Render Tree. | |
| - Layout of the render tree. | |
| - Painting. | |
| The science behind the scenes! |
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
| // formula/function to transform px to em. | |
| @function calc-em($target-px, $context) { | |
| @return ($target-px / $context) * 1em; | |
| } | |
| //use like this | |
| selector { | |
| padding-left: calc-em(20px, 16px); | |
| } |
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
| # ${1:Project Name} | |
| TODO: Write a project description | |
| ## Installation | |
| TODO: Describe the installation process | |
| ## Usage |
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
| // It strips the unit of measure and returns it | |
| @function strip-unit($num) { | |
| @return $num / ($num * 0 + 1); | |
| } | |
| // Converts "px" to "em" using the ($)em-base | |
| @function convert-to-em($value, $base-value: $em-base) { | |
| $value: strip-unit($value) / strip-unit($base-value) * 1em; | |
| @if ($value == 0em) { $value: 0; } // Turn 0em into 0 | |
| @return $value; |
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
| As a heads up make sure you have these things listed below. | |
| 1. Make sure that you have everything set up on Instagram with your Key https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L21 | |
| 2. You have your url's set up https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L29 | |
| 3. Subscribing your code to Instagram Real Time https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L123 | |
| 4.To change the hashtag you will need to change "object_id" https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L40 |
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
| function preloadimages(arr) { | |
| var newimages = [] | |
| , loadedimages = 0 | |
| , postaction = function() {} | |
| , arr = ( typeof arr != "object" ) ? [arr] : arr | |
| , i = 0; | |
| function imageloadpost(){ | |
| loadedimages++; | |
| if ( loadedimages == arr.length ) { |
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
| if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | |
| // some code.. | |
| } |
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
| function isIE() { return ((navigator.appName == 'Microsoft Internet Explorer') || ((navigator.appName == 'Netscape') && (new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null))); } |
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
| function isElementInViewport (el) { | |
| //special bonus for those using jQuery | |
| if (el instanceof jQuery) { | |
| el = el[0]; | |
| } | |
| var rect = el.getBoundingClientRect(); | |
| return ( |
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
| str.indexOf("is", str.indexOf("is") + 1); |
OlderNewer