This document has been moved!
This file contains 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
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
This file contains 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
FROM nvidia/opencl | |
SHELL ["/bin/bash", "-c"] | |
RUN apt update | |
RUN apt install -y build-essential ocl-icd-opencl-dev git curl | |
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y | |
RUN git clone --depth 1 https://github.com/0age/create2crunch | |
WORKDIR /create2crunch | |
RUN source $HOME/.cargo/env && cargo build --release | |
#Keyless Create2 |
Translate EVM bytecode into opcodes using pure Regex :)
Demo: https://twitter.com/0x796/status/1608039943582142464
Try here: https://regex101.com/
Use PCRE2 (Perl compatible) Regex flavor.
Search:
This file contains 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
# ▇ => ▇ + ▇ | |
# Minimal runtime bytecode for a contract that mutates | |
# into two child contracts and then self-destructs | |
# 1st child contract receives the call value | |
# 2nd child contract recevies the remaining balance | |
# author: Saw-mon and Natalie | |
# constructor payload for the spawned contract | |
# ┏━━━━━━━━━━━━━━━━━━━ push1 RUNTIME_BYTECODE_LEN # L |
This file contains 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract HeapSort { | |
function sort(uint256[] calldata _input) external pure returns (uint256[] memory) { | |
_buildMaxHeap(_input); | |
uint256 length = _input.length; | |
unchecked { | |
for (uint256 i = length - 1; i > 0; --i) { |
ASCI art characters for creating diagrams
- ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
- ASCII code 192 = └ ( Box drawing character single line lower left corner )
- ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
- ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This file contains 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
/** | |
* Base contract that all upgradeable contracts should use. | |
* | |
* Contracts implementing this interface are all called using delegatecall from | |
* a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
* dispatcher contract, which allows the called contract to update these at will. | |
* | |
* _sizes is a map of function signatures to return value sizes. Due to EVM | |
* limitations, these need to be populated by the target contract, so the | |
* dispatcher knows how many bytes of data to return from called functions. |
NewerOlder