This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ethers = require('ethers'); | |
const provider = new ethers.providers.JsonRpcProvider('https://bsc-dataseed.binance.org/'); | |
// you can find pair address from Factory Contract, method getPair(token1Addr, token2Addr). | |
let Contract = { | |
PancakePair: new ethers.Contract('0xb694ec7C2a7C433E69200b1dA3EBc86907B4578B',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider), | |
TwindexPair: new ethers.Contract('0xC789F6C658809eED4d1769a46fc7BCe5dbB8316E',['function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)'], provider) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.16; | |
interface IERC20 { | |
function balanceOf(address _owner) external view returns (uint256 balance); | |
function transfer(address _to, uint256 _value) external returns (bool success); | |
} | |
interface IFlashloanReceiver { | |
function executeOperation( | |
address sender, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* searches deep into an object recursively... | |
* @param {Object} obj object to be searched | |
* @param {any} searchValue the value/key to search for | |
* @param {Object} [options] | |
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise. | |
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded") | |
* @returns {string[]} Paths on the object to the matching results | |
*/ | |
const findPaths = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>For Topre REALFORCE 87 Users</name> | |
<devicevendordef> | |
<vendorname>TopreCorporation</vendorname> | |
<vendorid>0x0853</vendorid> | |
</devicevendordef> | |
<item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const EventEmitter = require("eventemitter3") | |
const emitter = new EventEmitter() | |
const express = require("express") | |
const cors = require("cors") | |
var app = express() | |
const subscribe = (req, res) => { | |
res.writeHead(200, { | |
"Content-Type": "text/event-stream", | |
"Cache-Control": "no-cache", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div id="messages"> | |
</div> | |
<script> | |
let source = new EventSource('http://localhost:3000') | |
source.onmessage = event => { | |
data = JSON.parse(event.data) | |
document.getElementById('messages').insertAdjacentHTML('beforeend', `<p>${data.message}</p>`) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"model": "themes.theme", | |
"pk": 1, | |
"fields": { | |
"name": "phoenix" | |
} | |
}, | |
{ | |
"model": "themes.theme", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ range $host, $containers := groupBy $ "Env.VIRTUAL_HOST" }} | |
upstream {{ $host }} { | |
{{ range $index, $value := $containers }} | |
{{ $network := index $value.Networks 0 }} | |
{{ with $address := index $value.Addresses 0 }} | |
server {{ $network.IP }}:80; | |
server {{ $network.IP }}:443; | |
{{ end }} | |
{{ end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
nginx: | |
image: nginx:latest | |
secrets: | |
- secret_data | |
secrets: | |
secret_data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Have purse and zipper in side | |
- comfortable to go bag | |
- hand crafted purse from Thailand | |
thai hippie bag, thai hippie bag elephant | |
elephant bag and purse | |
elephant bag for women |
NewerOlder