Skip to content

Instantly share code, notes, and snippets.

View joejordan's full-sized avatar

Joe Jordan joejordan

View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active July 24, 2024 13:05
linux-setup.sh
# 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 \
@samczsun
samczsun / README.md
Last active February 1, 2024 20:34
SEAL 911 Members

This document has been moved!

@coffeexcoin
coffeexcoin / Dockerfile
Created August 4, 2023 16:46
create2crunch dockerfile
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
@0age
0age / SeaportNavigatorABI.json
Created June 21, 2023 14:23
ABIs for SeaportNavigator & SeaportValidator contracts
[
{
"inputs": [],
"name": "CannotDeriveProofForSingleTokenId",
"type": "error"
},
{
"inputs": [],
"name": "CannotDeriveRootForSingleTokenId",
"type": "error"
@vicnaum
vicnaum / EVM_Regex_Decompiler.md
Created December 28, 2022 10:03
EVM Regex Decompiler
# ▇ => ▇ + ▇
# 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
@fiveoutofnine
fiveoutofnine / HeapSort.sol
Created March 16, 2022 04:00
Solidity implementation of max-heapsort
// 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) {
@dsample
dsample / README.md
Last active July 19, 2024 14:14
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • 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 )
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active July 24, 2024 22:18
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

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.

Falsehoods

  • 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).
/**
* 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.