Skip to content

Instantly share code, notes, and snippets.

View techyaura's full-sized avatar
🧿
Focusing

Abhay techyaura

🧿
Focusing
View GitHub Profile
@techyaura
techyaura / mysql-tests.md
Created October 27, 2020 18:42 — forked from come-maiz/mysql-tests.md
MySQL snap testing
@techyaura
techyaura / javascript-set.js
Last active August 23, 2019 11:53
Javascript Sets & their implementation
/** Syntax for creating Set*/
const set = new Set();
/** Syntax for adding element to Set*/
set.add(4); // {4}
set.add(5); // {4,5}
set.add(4); // {4, 5}
/** Syntax for deleting element to Set*/
set.delete(4); // {5}
@techyaura
techyaura / watchers.js
Last active May 9, 2019 08:23
function to calculate no of watchers in angular js (v1.3.2 & onwards)
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
@techyaura
techyaura / morse.js
Created March 28, 2019 07:25 — forked from eholk/morse.js
A Morse Code generator in Java Script
// Copyright 2014–2017, Eric Holk
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@techyaura
techyaura / conf.js
Last active September 10, 2018 09:20
Protractor basic setup
exports.config = {
allScriptsTimeout: 100000,
//rootElement defaults to body.
//If you don't have your ng-app in the body, you will get that error
rootElement: 'body',
directConnect: true,
plugins: [
{
inline: require('protractor-console'),
logLevels: ['severe', 'warnings']