Skip to content

Instantly share code, notes, and snippets.

View darkerego's full-sized avatar

Darkerego darkerego

View GitHub Profile
#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir openwrt_build
cd openwrt_build
git clone --depth=1 git://git.openwrt.org/15.05/openwrt.git
async def main():
coroutine1 = do_some_work(1)
coroutine2 = do_some_work(2)
coroutine3 = do_some_work(4)
tasks = [
asyncio.ensure_future(coroutine1),
asyncio.ensure_future(coroutine2),
asyncio.ensure_future(coroutine3)
]
@darkerego
darkerego / uniswap-v3-example.sol
Created September 6, 2023 13:04 — forked from mempirate/uniswap-v3-example.sol
Simple example on how to swap on UniswapV3 with the SwapRouter
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";