Skip to content

Instantly share code, notes, and snippets.

View nch7's full-sized avatar

Nick Chikovani nch7

View GitHub Profile
var HttpsProxyAgent = require('https-proxy-agent');
var request = require('request');
var agent = new HttpsProxyAgent('http://192.69.250.116:1212')
request({
agent: agent,
"uri": "http://requestb.in/1a5eo7b1",
"method": "GET"
}, function(err, response, body) {
<!DOCTYPE html>
<html>
<head>
<title>Geolocation</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0;
Model::where(['ragaca1'=>'true', 'ragaca2'=>'false'])->where(function($q){
$q->orWhere('price','>=','100');
$q->orWhere('noprice','=','1');
})->where(function($q){
$q->orWhere('price','<=','1000');
$q->orWhere('noprice','=','1');
})->get();
Model::where(['ragaca1'=>'true', 'ragaca2'=>'false'])->where(function($q){
$q->orWhere('price','>=','100');
$q->orWhere('noprice','=','1');
})->where(function($q){
$q->orWhere('price','<=','1000');
$q->orWhere('noprice','=','1');
})->get();
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
@nch7
nch7 / contracts...interfaces...Address.sol
Created December 30, 2021 23:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// this line is added to create a gist. Empty file is not allowed.
@nch7
nch7 / .deps...github...Arachnid...solidity-stringutils...strings.sol
Created December 30, 2021 23:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
./src/strings.sol
@nch7
nch7 / contracts...DataSource.sol
Created December 30, 2021 23:37
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface IUniswapV3Pool {
function swap(
address recipient,
bool zeroForOne,
int256 amountSpecified,
@nch7
nch7 / gist-dac24a51a735e42f864c0ae14cedf9af...contracts...Swapper.sol
Created December 30, 2021 23:41
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.7;
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
import { FlashLoanReceiverBase } from "./interfaces/FlashLoanReceiverBase.sol";
import "./interfaces/ILendingPoolAddressesProvider.sol";
import "./interfaces/ILendingPool.sol";