Skip to content

Instantly share code, notes, and snippets.

View Mc01's full-sized avatar
🥑
Chilling and looking for 🦖

Mc01.eth Mc01

🥑
Chilling and looking for 🦖
View GitHub Profile
@Mc01
Mc01 / flashloan.sol
Last active April 18, 2023 20:19
[SCAM] Flash Loan Attack
pragma solidity ^0.5.0;
// Multiplier-Finance Smart Contracts - this is bullshit
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol";
import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPool.sol";
// PancakeSwap Smart Contracts - this is bullshit
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeCallee.sol";
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakeFactory.sol";
import "https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/interfaces/IPancakePair.sol";
@gorgos
gorgos / High-Stakes Roulette Example
Last active July 17, 2023 03:07
Example for a contract for playing high-stakes Roulette on the blockchain
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract BankOwned {
address public bankAddress;
constructor() {
bankAddress = msg.sender;
}
@ivaravko
ivaravko / terraform-kubernetes-docker-macos.md
Last active April 10, 2024 00:17
The simple Terraform and Kubernetes with Docker on macOS

If you'd like to experiment with Terraform and Kubernetes on macOS locally, a great provider for doing so is the Kubernetes provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

@simonw
simonw / recover_source_code.md
Last active June 21, 2024 00:11
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb