Skip to content

Instantly share code, notes, and snippets.

@michaelneuder
michaelneuder / eip7251.md
Last active March 19, 2024 01:44
eip7251 related work
const UniswapV2FactoryArtifact = require('@uniswap/v2-core/build/UniswapV2Factory.json');
const UniswapV2PairArtifact = require('@uniswap/v2-core/build/UniswapV2Pair.json');
const UniswapV2Router02Artifact = require('@uniswap/v2-periphery/build/UniswapV2Router02.json');
const WETH9Artifact = require('@uniswap/v2-periphery/build/WETH9.json');
async function createMockWETH() {
// deploy mock WETH
const WETH9 = await ethers.getContractFactory(
Management - 0x10cc060f6f9b2e5dcdb23f1361e4b368a7daec73
BlackBox - 0xcbed313fb924589d06a267594722553bc3c7e6bc (0x5fde9da6056f8a651ae148c9c3a5364885f35548) (0x56e0f6e0ea8a43f130b304f1bf70a1029ce8fd0e)
Breeding (UnicornContract) - 0x500bdb15c836cd6562c8624b7441fef6eca5786a(0xb0f0557a50425922da4b5765e14db794c93e837a) (0x93b7fa538913201066a262c03179c342262a7c76) (0x4fdb91dbce6cee2e08cf85d26eaa3e9bca0c12fe)
BreedingDB - 0xcd3fa0487f41cc2fe73d3278f5356ffee0cbcc4b
Unicorn Token - 0xcf0010af06edff540af798d06e866d95cbdc8488
Dividend Token - 0xc6a5cc090b709ee71080effff3b0dddbd9d9d8e4
Dividend Manager - 0xb58f5f3adcbe928ea343c12d047656c59b3c1f2a
Candy Coin - 0xcD3673aF09e76C74d889aaBab68cA0645566A3a1
@nrollr
nrollr / MongoDB_macOS_Sierra.md
Last active April 1, 2024 16:23
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@rponte
rponte / get-latest-tag-on-git.sh
Last active March 11, 2024 07:50
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active March 15, 2024 11:26
Opening and closing an SSH tunnel in a shell script the smart way

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost

@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});