Skip to content

Instantly share code, notes, and snippets.

View rony4d's full-sized avatar

Ugochukwu Aronu rony4d

View GitHub Profile
@rony4d
rony4d / create-wallet.js
Created November 3, 2020 10:57
Creates a wallet on Binance Smart Chain
// Web3 doc: https://web3js.readthedocs.io/en/v1.2.11/web3-eth-accounts.html#create
const Web3 = require('web3');
const web3 = new Web3("https://data-seed-prebsc-1-s1.binance.org:8545");
var account = web3.eth.accounts.create([Date.now().toString()]);
console.log(account);
@rony4d
rony4d / BEP20.sol
Created November 3, 2020 09:47
This file is a template for the Binance Smart Chain token standard that extends ERC-20, the most common Ethereum token standard.
pragma solidity 0.5.16;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
@rony4d
rony4d / BEP20.sol
Created November 3, 2020 09:46
This file is a template for the Binance Smart Chain token standard that extends ERC-20, the most common Ethereum token standard.
pragma solidity 0.5.16;
interface IBEP20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the token decimals.
@rony4d
rony4d / dictionary.c
Last active March 12, 2020 03:32
Reference: https://www.cs.yale.edu/homes/aspnes/pinewiki/C(2f)HashTables.html?highlight=%28CategoryAlgorithmNotes%29 idtablehashtable.c is the same as the IDList.c on the reference link and dictionary.c is the same as dict.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include "dictionary.h"
#define INITIAL_SIZE (1024)
#define GROWTH_FACTOR (2)
#define MAX_LOAD_FACTOR (1)
@rony4d
rony4d / Openwrt_default.txt
Created February 6, 2020 16:50
Default packages that come pre-installed with openwrt.
Package name Version
base-files 194.2-r7897-9d401013fc
busybox 1.28.4-3
dnsmasq 2.80-1.4
dropbear 2017.75-7.1
firewall 2018-08-13-1c4d5bcd-1
fstools 2019-03-28-ff1ded63-5
fwtool 1
hostapd-common 2018-05-21-62566bc2-8
ip6tables 1.6.2-3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Jose;
using Microsoft.AspNetCore.Mvc;
@rony4d
rony4d / Config.cs
Last active April 13, 2018 05:44
Dotnet Wallet Console App
using System;
using System.IO;
using Newtonsoft.Json;
using NBitcoin;
namespace DotNetWallet
{
public enum ConnectionType
{
FullNode,
0xBD91e8d7a66491E3D29089eACf07A36b9f481d28