Skip to content

Instantly share code, notes, and snippets.

View vetri02's full-sized avatar
🎯
Focusing

Vetrichelvan Jeyapalpandy vetri02

🎯
Focusing
View GitHub Profile
@vetri02
vetri02 / cloudSettings
Created September 27, 2021 13:24
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-27T13:24:36.038Z","extensionVersion":"v3.4.3"}
validators.result.map(async item => {
const maticValidatorContract = new this.web3.eth.Contract(
maticABI,
item.contractAddress
);
const stakeManagerContractAddress = await maticValidatorContract.methods
.stakeManager()
.call()
.then(response => response);
{
from: "0x8b1b0f049b9a7c76bd721b14d90359a3dee1f58d",
to: "0xF92C1ad75005E6436B4EE84e88cB23Ed8A290988",
value: 0,
data: "0xfc6f4e160000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000e2573b394edf84e000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000004200000000000000000000000000000000000000000000000000000000000000480000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f92c1ad75005e6436b4ee84e88cb23ed8a290988000000000000000000000000587044b74004e3d5ef2d453b7f8d198d9e4cb5580000000000000000000000000000000000000000000000000000000000000
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vetri02
vetri02 / Heart Animation
Last active April 18, 2018 18:49
Heart Animation
Heart Animation
@vetri02
vetri02 / arrayList.js
Last active November 14, 2017 09:43
Add 100000 numbers in lines to DOM
function arrayList(array, rootDom){
var arrDom = [];
console.log(array)
var frag = document.createDocumentFragment();
for (var i=0; i < array.length; i++){
console.log(array[i]);
// arrDom.push('<p>'+array[i]+'</p>');
var p = document.createElement("p");
p.innerHTML = array[i];
frag.appendChild(p);
@vetri02
vetri02 / anag.js
Created September 20, 2013 20:24
Gives back the anagram of the string thats being passed in eg. anag("abc") Result: [ 'cab', 'bca', 'abc', 'cba', 'acb', 'bac' ]
/* NEED TO PERFORMANCE TUNE */
function anag(str){
'use strict';
if(typeof str !== 'string'){
return ;
}
str = str.replace(/\s+/g, '').toLowerCase();
@vetri02
vetri02 / scrap_github_explore.py
Created September 6, 2013 18:11
From Neckbeard Republic, learnt this from the web scraping section and changed the code according to new Github Explore pages
import requests
from bs4 import BeautifulSoup
GITHUB_EXPLORE_PAGE = 'https://github.com/explore'
def get_html_explore():
response = requests.get(GITHUB_EXPLORE_PAGE)
return response.content
@vetri02
vetri02 / arrErr.js
Created October 7, 2012 17:00
Find Issue in FF
var fg = function(s){
var d = s+1;
return d;
};
var callFunc = function (f) {
var i,arr;
arr = [];
for(i=0;i<1;i+1){
arr.push(f(i));
@vetri02
vetri02 / bf.js
Created August 21, 2012 10:04
for loop in JS using special characters
var l = +!+[];
for(var i = +[];i <= !+[]+!+[]; i++){
l = l+(+!+[]);console.log(l);
}