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 / Interview code check 2022
Last active January 11, 2022 06:16
Interview code check 2022
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
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
Mixins:
----
Example 1:
@mixin square($size, $color) {
width: $size;
height: $size;
background-color: $color;
}
@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
Drupal 7/Omega framework
More Sass
AngularJS
Build jQuery plugins
CORS implementation
Oracle WCM
More google analytics
What I want to learn:
--------------------
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];
@eshrinivasan
eshrinivasan / FizzBuzz.js
Created May 10, 2016 02:16 — forked from jaysonrowe/FizzBuzz.js
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);