Skip to content

Instantly share code, notes, and snippets.

View Sam-Devs's full-sized avatar

Sam Ayorinde Sam-Devs

View GitHub Profile
@Sam-Devs
Sam-Devs / index.ts
Last active October 8, 2022 16:45
A code snippet to detect when a transaction is sent from an Ethereum account and get the current balance of the account at the particular time.
import Web3 from "web3";
import dotenv from "dotenv";
dotenv.config();
class TransactionChecker {
web3: any;
account: string;
constructor(projectId: string, account: string) {
this.web3 = new Web3(

Keybase proof

I hereby claim:

  • I am sam-devs on github.
  • I am sam_on_code (https://keybase.io/sam_on_code) on keybase.
  • I have a public key ASD2QvqOD-7Fx-qr6Nb9O6VvHQVSMVGkiJ58TrKoqXnYRQo

To claim this, I am signing this object:

0x51d25444248C797D4604C0D2d5e54308988CBEa8
@Sam-Devs
Sam-Devs / Console Tricks
Last active January 31, 2020 17:52
Console Tricks
<html>
<body>
<p onClick="makeGreen()">×BREAK×DOWN×</p>
<script>
const dogs = [{ name: 'Sam', age: 2 }, { name: 'Hugo', age: 8 }];
function makeGreen() {
const p = document.querySelector('p');
@Sam-Devs
Sam-Devs / info.json
Last active January 25, 2020 00:25
This file provide information about Nigerian States, it includes each state capital, area, gpd etc.
// The population of the states of Nigeria
// according to census results and latest
// population projections as of 2016-03-21.
[
{
"capital": "Umuahia",
"area_(km)": 6320,
"population": "193392500",
// 20200122102434
// https://gist.githubusercontent.com/Miserlou/c5cd8364bf9b2420bb29/raw/2bf258763cdddd704f8ffd3ea9a3e81d25e2c6f6/cities.json
// The population of the states of Nigeria
// according to census results and latest
// population projections as of 2016-03-21.
[
{
"capital": "Umuahia",