Skip to content

Instantly share code, notes, and snippets.

View oguduvictor's full-sized avatar

Victor Ogudu oguduvictor

  • Lagos, Nigeria
View GitHub Profile
import Web3 from "web3";
import { abi as IUniswapV2Pair } from "@uniswap/v2-core/build/IUniswapV2Pair.json";
import { BigNumber } from "bignumber.js";
import { ChainId, Token, WETH, Fetcher, Route } from "@uniswap/sdk";
// Create a new Web3 Instance
const web3 = new Web3(window.ethereum);
// Replace the addresses to point to your Farming Contract
// and LP Token Contract on the desired network
@hideojoho
hideojoho / Vagrant_elasticsearch_kibana.md
Last active June 28, 2021 08:00
How to set up a virtual machine with Elasticsearch and Kibana using Vagrant. See https://gist.github.com/hideojoho/a7f8fa864a250380b0e78c5fcbc4d52e for 2019 version.

Requirements

  • At least 6-8GB of RAM (of those 4GB will be used for a virtual machine)
  • About 1GB of diskspace
  • 1-2 hours of time (depends on your network speed)

Environments

  • MacOSX 10.11.6
  • VirtualBox 5.1.10
  • Vagrant 1.8.7
@weslleih
weslleih / date.extensions.ts
Last active April 23, 2025 20:15
Extend the TypeScript Date Object with some useful methods
export {}
declare global {
interface Date {
addDays(days: number, useThis?: boolean): Date;
isToday(): boolean;
clone(): Date;
isAnotherMonth(date: Date): boolean;
isWeekend(): boolean;
isSameDate(date: Date): boolean;
@evanwill
evanwill / gitBash_windows.md
Last active August 6, 2025 09:33
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so