This file contains 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
/* | |
Universal debug utility | |
*/ | |
This file contains 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
<h2> Javascript</h2> | |
What are the differences between null and undefined? | |
What are the differences between == and ===? | |
What is reflow? What causes reflow? How could you reduce reflow? | |
What is repaint and when does this happen? | |
What does defer and async keyword does in a script tag? | |
What is the difference between .call and .apply, .bind? | |
Explain "this" in javascript | |
Explain prototypal inheritance in javascript |
This file contains 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
Mixins: | |
---- | |
Example 1: | |
@mixin square($size, $color) { | |
width: $size; | |
height: $size; | |
background-color: $color; | |
} |
This file contains 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
block vs inline | |
id(one) vs class(many) | |
positioning | |
https://jsfiddle.net/nsshrinivasan/s06vtsvk/1/ | |
https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning |
This file contains 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
Drupal 7/Omega framework | |
More Sass | |
AngularJS | |
Build jQuery plugins | |
CORS implementation | |
Oracle WCM | |
More google analytics | |
What I want to learn: | |
-------------------- |
This file contains 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
For newer Mac portables (15-inch Double-Layer SD, all models of MacBook, and all models of MacBook Pro), follow these steps: | |
1. Plug in the power adapter and fully charge your PowerBook's battery until the light ring or LED on the power adapter plug changes to green and the onscreen meter in the menu bar indicates that the battery is fully charged. | |
2. Allow the battery to rest in the fully charged state for at least two hours. You may use your computer during this time as long as the adapter is plugged in. | |
3. Disconnect the power adapter while the computer still on and start running the computer off battery power. You may use your computer during this time. When your battery gets low, the low battery warning dialog appears on the screen. | |
4. At this point, save your work. Continue to use your computer; when the battery gets very low, the computer will automatically go to sleep. | |
5. Turn off the computer or allow it to sleep for five hours or more. | |
6. Connect the power adapter and leave it connected until the |
This file contains 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
// Attach a delegated event handler with a more refined selector | |
$( "#list" ).on( "click", "a[href^='http']", function( event ) { | |
$( this ).attr( "target", "_blank" ); | |
}); |
This file contains 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
>> Accidental global variable | |
>> Circular references: | |
javascript obj = dom object; | |
dom object property = javascript obj; | |
>> Improper use of closures | |
>> SetInterval | |
------------------- | |
>>Algorithms |
This file contains 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 takesTwoParams(a, b){ | |
var args = Array.prototype.slice.call(arguments); | |
alert(" your parameters were " + args.join(", ")); | |
} | |
Let’s take a look at that a bit more in-depth: | |
Array: This object is the original array that all other arrays inherit their properties from. | |
Array.prototype:This gives us access to all the methods properties that each array inherits |
This file contains 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 execJSONP(url, cb) { //url (without "callback=" parameter!) and callback function | |
var script = document.createElement('script'); | |
script.async = true; | |
var callb = 'exec'+Math.floor((Math.random()*65535)+1); | |
window[callb] = function(data) { | |
var scr = document.getElementById(callb); | |
scr.parentNode.removeChild(scr); | |
cb(data); | |
window[callb] = null; | |
delete window[callb]; |