Skip to content

Instantly share code, notes, and snippets.

View Harkishen-Singh's full-sized avatar
💭
Engineering high-perf tools

Harkishen Singh Harkishen-Singh

💭
Engineering high-perf tools
View GitHub Profile
@Harkishen-Singh
Harkishen-Singh / webdriver-hover.js
Created March 15, 2019 18:45 — forked from umaar/webdriver-hover.js
Hover over an element in WebDriverJS
/*
* Hover over an element on the page
*/
(function() {
"use strict";
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().usingServer().withCapabilities({'browserName': 'chrome' }).build();
@Harkishen-Singh
Harkishen-Singh / memorySizeOfObject.js
Created April 4, 2020 19:34
calculate memory size of javascript object, it is not a accurate value!
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
break;
case 'string':
@Harkishen-Singh
Harkishen-Singh / main.go
Created June 30, 2020 20:45 — forked from gouthamve/main.go
A complete runnable example
package main
import (
"fmt"
"io/ioutil"
"os"
"time"
"github.com/prometheus/tsdb"
"github.com/prometheus/tsdb/labels"