Skip to content

Instantly share code, notes, and snippets.

View vikneshwar's full-sized avatar

vikneshwar vikneshwar

  • Automattic
  • Chennai
View GitHub Profile
A) Things that your work made impact on your previous project
1) Implemented Behavioural tracking framework by co-ordinating with analytics teams in Ancestry project which helped marketing team get proper customer insights which direrctly made impact of company's revenue
2) Worked on Ride later feature in startup which bought more customers to the platform
3) Worked on implementing security framework to mitigate common vulnerablities in CBX
// .bind()
//==============================Beginning==================================
Function.prototype.customBind = function (bindScope, ...args) {
const self = this;
return function (...anotherArgs) {
self.apply(bindScope, [...args, ...anotherArgs]);
};
};
const obj = {
Business Analyst - Chennai
https://www.linkedin.com/jobs/view/1837556826
https://www.linkedin.com/jobs/view/1826238059
https://www.linkedin.com/jobs/view/1812804275
https://www.linkedin.com/jobs/view/1736526931
https://www.linkedin.com/jobs/view/1824159461
https://www.linkedin.com/jobs/view/1630209314
https://www.linkedin.com/jobs/view/1819423427
https://www.linkedin.com/jobs/view/1725965181
https://www.linkedin.com/jobs/view/1824101770
@vikneshwar
vikneshwar / connect.js
Created June 2, 2019 13:39 — forked from gaearon/connect.js
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@vikneshwar
vikneshwar / global-variables-are-bad.js
Created May 27, 2019 21:07 — forked from hallettj/global-variables-are-bad.js
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@vikneshwar
vikneshwar / css-tips.css
Last active May 1, 2019 14:45
few css hacks to know
/* ================================================================================================ */
/* for parent staying out of the container which may occur due to absolute positioning or using float in child element (because absolute and float takes the elment out of normal flow) use below hacks*/
/* example dom */
/* <div class="container">
<div class="box">
<h1>Box 1</h1>
<p>Adipiscing arcu scelerisque massa velit magna auctor urna dictumst diam montes tincidunt diam eu duis! Cum dictumst sed! Nisi in.</p>
let val = {
a: { b: { c: 10 }, d: { f: 20 } },
j: { l: { c: 30 } },
k: { k: { c: 40, k: 44 }, h: { f: 10 } },
};
// expected output arr = [20,10] // all the inner most f
let arr = [];
function getKeyValues(obj) {
//pure functions
//given a input will always return a same output
//will not cause side effects
const add = (a, b) => a + b;
//impure function 1
const magicLetter = "*";
const createMagicPhrase = (phrase) => `${magicLetter}abra${phrase}`;
//impure function 2
console.log(a);
var a = 10;
var b = 20;
console.log(a);
//the above code executes as below internally due to hoisting
//variable hoisting
var a, b;
console.log(a);
a = 10;
process.stdin.resume();
process.stdin.setEncoding('ascii');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});