Skip to content

Instantly share code, notes, and snippets.

const { ethers } = require("ethers");
const provider = new ethers.providers.JsonRpcProvider("http://0.0.0.0:8545");
// https://info.uniswap.org/pair/0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc
const uniswapUsdtWethExchange = "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc";
// this ABI object works for both Uniswap and SushiSwap
const uniswapAbi = [
"event Swap(address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to)",
];
@un33k
un33k / app.js
Created April 24, 2014 01:45 — forked from amineeg/app.js
'use strict';
// Declare app level module which depends on filters, and services
var app= angular.module('myApp', ['ngRoute']);
app.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/login', {templateUrl: 'partials/login.html', controller: 'loginCtrl'});
$routeProvider.otherwise({redirectTo: '/login'});
}]);
@ddewaele
ddewaele / Android Studio Day1.md
Last active October 7, 2016 11:12
Some notes on my first day with Android Studio

##Introduction

The goal of this article was to take a look at the latest Android Studio (v0.2.5) and see where it would take me in a single day.

For me an IDE should be simple, straightforward and hassle-free. The big pain in Android development has always been the IDE and more specifically the tooling around it. Somehow the Eclipse plugins never worked well with the core Android tools and build system. Third party tools and plugins to offload dependency management to Maven were also far from ideal.

In short, it was a difficult marriage that ultimately led to choosing IntelliJ IDEA as the preferred platform for Android Development Tooling.

Unfortunately this again left developers with a 0.x product, meaning it's going to be very rough around the edges. It's a very difficult decision to make for developers. Stick with something you know but that is far from ideal, or go with something entirely new that is supposed to be better, but in reality could also take a very long time before it reaches some kind of

@heroicyang
heroicyang / duoshuo_style.css
Last active May 15, 2020 09:06
Custom style for DuoShuo comment plugin in Hexo modernist theme
.ds-meta,
#ds-thread #ds-reset .ds-powered-by {
display: none;
}
#ds-thread #ds-reset .ds-sort a.ds-current,
#ds-thread #ds-reset .ds-sort a:active,
#ds-reset .ds-highlight,
#ds-thread #ds-reset .ds-login-buttons .ds-more-services {
color: #069 !important;
{
"directory": "components"
}