Skip to content

Instantly share code, notes, and snippets.

View AhmedSakrr's full-sized avatar
💻
Assembly | C/C++ | PHP | Python | JavaScript | Solidity Programmer.

Ahmed Sakr AhmedSakrr

💻
Assembly | C/C++ | PHP | Python | JavaScript | Solidity Programmer.
View GitHub Profile
const https = require("https");
function fetchP2PData(page = 1, fiat = "MMK", tradeType = "BUY", asset = "USDT", payTypes = []) {
return new Promise((resolve, reject) => {
const baseObj = {
page,
rows: 3,
publisherType: null,
asset,
tradeType,
// SPDX-License-Identifier: MIT
// author: yoyoismee.eth -- it's opensource but also feel free to send me coffee/beer.
// 8 8888888888 8 8888 .8. d888888o. 8 8888 8 8 8888 ,88' 8 8888 88 8 888888888o
// 8 8888 8 8888 .888. .`8888:' `88. 8 8888 8 8 8888 ,88' 8 8888 88 8 8888 `88.
// 8 8888 8 8888 :88888. 8.`8888. Y8 8 8888 8 8 8888 ,88' 8 8888 88 8 8888 `88
// 8 8888 8 8888 . `88888. `8.`8888. 8 8888 8 8 8888 ,88' 8 8888 88 8 8888 ,88
// 8 888888888888 8 8888 .8. `88888. `8.`8888. 8 8888 8 8 8888 ,88' 8 8888 88 8 8888. ,88'
// 8 8888 8 8888 .8`8. `88888. `8.`8888. 8 8888 8 8 8888 88' 8 8888 88 8 8888888888
// 8 8888 8 8888 .8' `8. `88888. `8.`8888. 8 8888888888888 8 888888< 8
@DappaDanDev
DappaDanDev / FlashLoanReceiverBase.sol
Last active February 1, 2024 15:24
Creating a Flash Loan using Aave
pragma solidity ^0.6.6;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/IERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/SafeERC20.sol";
import "./IFlashLoanReceiver.sol";
import "./ILendingPoolAddressesProvider.sol";
import "./Withdrawable.sol";
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver, Withdrawable {
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {FlashLoanReceiverBase} from "@aave/protocol-v2/contracts/flashloan/base/FlashLoanReceiverBase.sol";
import {SafeERC20} from "@aave/protocol-v2/contracts/dependencies/openzeppelin/contracts/SafeERC20.sol";
import "@aave/protocol-v2/contracts/interfaces/ILendingPool.sol";
import "@aave/protocol-v2/contracts/interfaces/ILendingPoolAddressesProvider.sol";
import {IBentoBoxV1} from "@sushiswap/bentobox-sdk/contracts/IBentoBoxV1.sol";
import {IERC20 as IBentoERC20} from "@boringcrypto/boring-solidity/contracts/interfaces/IERC20.sol";
@timothycarambat
timothycarambat / index.html
Last active January 12, 2024 17:43
Basic Web3 login, store login eth address, and read public variable from a smart contract
<head>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/web3/1.6.1/web3.min.js"
integrity="sha512-5erpERW8MxcHDF7Xea9eBQPiRtxbse70pFcaHJuOhdEBQeAxGQjUwgJbuBDWve+xP/u5IoJbKjyJk50qCnMD7A=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
@4skinSkywalker
4skinSkywalker / VPVR.pine
Last active May 24, 2024 08:41
Volume Profile Visible Range in Pine Script
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Fr3d0C0rl30n3
//@version=4
study("Fr3d0's Volume Profile Visible Range", "VPVR", overlay=true, max_boxes_count=500)
DEFAULT_COLOR = color.new(color.gray, 0)
BORDER_COLOR = color.new(color.black, 80)
BUY_COLOR = color.new(color.green, 0)
SELL_COLOR = color.new(color.red, 0)
@ari-mag
ari-mag / contracts...Flashloan.sol
Created September 8, 2021 00:13
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.5.16+commit.9c3226ce.js&optimize=false&runs=200&gist=
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
interface Structs {
struct Val {
uint256 value;
}
enum ActionType {
Deposit, // supply tokens
@jctosta
jctosta / docker-wsl2-memory-limits.md
Created June 14, 2021 21:23
You can limit docker-windows memory usage by adjusting some parameters in wsl2 configuration.

Limit WSL2 Memory Usage when using Docker for Windows

You can limit docker-windows memory usage by adjusting some parameters in wsl2 configuration.

First, close any instances of Docker Windows currently running and create a new file named .wslconfig in your user home directory, like C:\Users<username>:

[wsl2]
memory=4GB
processors=5
@adidonato
adidonato / kovan
Created May 24, 2021 17:08
kovan
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;
interface Structs {
struct Val {
uint256 value;
}
enum ActionType {
Deposit, // supply tokens
@muff-in
muff-in / resources.md
Last active June 29, 2024 02:00
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources