Skip to content

Instantly share code, notes, and snippets.

View eshrinivasan's full-sized avatar
🏠
Working from home

Neelmeg eshrinivasan

🏠
Working from home
View GitHub Profile
@eshrinivasan
eshrinivasan / gist:f1755c80bb4d5107dc99ccc55c03ca81
Last active June 4, 2019 01:49
console log wrapper, debug statement, utility
/*
Universal debug utility
*/
@eshrinivasan
eshrinivasan / assessment.html
Last active May 28, 2018 08:47
UI questions
<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
Mixins:
----
Example 1:
@mixin square($size, $color) {
width: $size;
height: $size;
background-color: $color;
}
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
Drupal 7/Omega framework
More Sass
AngularJS
Build jQuery plugins
CORS implementation
Oracle WCM
More google analytics
What I want to learn:
--------------------
@eshrinivasan
eshrinivasan / macbook_pro_battery
Created July 9, 2016 21:34
how to charge macbook pro battery
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
>> Accidental global variable
>> Circular references:
javascript obj = dom object;
dom object property = javascript obj;
>> Improper use of closures
>> SetInterval
-------------------
>>Algorithms
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
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];