Skip to content

Instantly share code, notes, and snippets.

View sagarvd01's full-sized avatar

Sagar V sagarvd01

View GitHub Profile
[
{
"title": "The Little Red Hen",
"content": `Once upon a time on a quiet little farm, there lived a hardworking Little Red Hen. She spent her days tending to the garden, keeping her nest neat and warm, and pecking for worms and grains in the soft soil.
One sunny morning, as she scratched the ground near the barn, she found a few grains of wheat.
“Oh, look!” she clucked. “If I plant these grains of wheat, they will grow into tall wheat stalks. Then I can harvest them and make bread!”
So, she went to her animal friends and asked,
retrieveAddresses = () => {
let add = [];
Array.from(document.querySelectorAll('[data-testid=comment]')).forEach(d => {
let cm = d.querySelector('div').innerText;
if(/0x/igm.test(cm))
add.push(cm.match(/0x[A-z0-9]{40}/i)[0]);
})
return add;
};
pickWinners = (add, winner_count) => {

Keybase proof

I hereby claim:

  • I am sagarvd01 on github.
  • I am sagarvd01 (https://keybase.io/sagarvd01) on keybase.
  • I have a public key ASDXH0ZOIupRt8Z1I35XhIvnuKWu1RU1uwIoeuI6oLxjego

To claim this, I am signing this object:

//initialize an array with 100K entries
arr = [], a = [], b = [];
for(var i = 0; i < 100000; i++){
arr.push(i);
}
//for loop
console.time("For Loop");
console.groupCollapsed();
for( i=0; i< arr.length; i++ ){
a.push(arr[i]);
//create an array with 100K entries
arr = [];
for(var i = 0; i < 100000; i++){
arr.push(i);
}
//for loop
console.time("For Loop");
console.groupCollapsed();
for( i=0; i< arr.length; i++ ){
console.log(arr[i]);
.dropdown:hover .dropdown-menu{
display:block
}
.dropdown-menu{
margin-top: 0px !important;
}
.dropdown:hover .dropdown-menu{
display:block
}
<li class="nav-item dropdown">
<a class="nav-link" href="#">Main Menu</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Sub-menu</a>
<a class="dropdown-item" href="#">Sub-menu 2</a>
</div>
</li>
window._sharedData = {
"config":{
"csrf_token":"5T**03******************X8r5A***",
"viewer":{
"biography":"Your Bio Section",
"external_url":"https://example.com",
"full_name":"Your Name",
/*
etc...
*/
a = {
a : "12",
b : "45",
abc : function(){return this}
}
console.log(a.abc());