Skip to content

Instantly share code, notes, and snippets.

@ItsCuzzo
ItsCuzzo / disassembler.py
Created December 24, 2022 06:08
EVM Bytecode Disassembler
opcodes = {
0x00: 'STOP',
0x01: 'ADD',
0x02: 'MUL',
0x03: 'SUB',
0x04: 'DIV',
0x05: 'SDIV',
0x06: 'MOD',
0x07: 'SMOD',
0x08: 'ADDMOD',
0: ["close up human eye by alex grey | close up human eye by alex grey | large brain neurons by Zdzisław Beksiński | picnic by mario martinez art | Brain by Johfra Bosschart | Neurons by beeple | Neurons by alex grey"],
48: ["thumbs down vector art by johfra bosschart"],
63: ["racism photography oil painting | racist illustrated in art by moebius"],
95: ["thumbs up vector art by beeple"],
114: ["pride flag by moebius | pride flag by beeple | pride flag | rainbow flag"],
144: ["metal heart by beeple, Ben Tolman and Moebius"],
184: ["human being by beeple, Ben Tolman and Moebius | people by beeple, Ben Tolman and Moebius | person by beeple, Ben Tolman and Moebius"],
202: ["electrical grid by johfra bosschart | electric power station by moebius"],
260: ["matrix code wallpaper | computer keyboard | programming | supercomputer"],
313: ["thumbs up vector art by moebius"],
@dabit3
dabit3 / ceramic_identity_playground.js
Last active February 26, 2022 17:12
Playing around with Ceramic identity and self.id
import { useState } from 'react'
import Head from 'next/head'
import styles from '../styles/Home.module.css'
import { CeramicClient } from '@ceramicnetwork/http-client'
import { DID } from 'dids'
import { ThreeIdConnect } from '@3id/connect'
const SID = require('@self.id/web')
const { EthereumAuthProvider, SelfID, WebClient } = SID
@gorgos
gorgos / MultiSwap.sol
Created August 22, 2021 11:04
Example for how to swap multiple tokens in one on Ropsten
// SPDX-License-Identifier: MIT
pragma solidity =0.7.6;
pragma abicoder v2;
import "https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/interfaces/ISwapRouter.sol";
import "https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/interfaces/IQuoter.sol";
import {IERC20, SafeERC20} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.4-solc-0.7/contracts/token/ERC20/SafeERC20.sol";
interface IUniswapRouter is ISwapRouter {
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active September 1, 2023 16:49
My growing list of Rust programs to use.
@christroutner
christroutner / js-buf.md
Last active September 8, 2020 16:58
Working with Buffers and Hex Strings

Working with JavaScript Buffers, Hex, and Strings

// Start with a normal base-10 number.
const numNum = 123; // 7B in hex
console.log(`numNum: `, numNum);
// numNum:  123

// Convert the Number to a String
@asimjalis
asimjalis / fast-clojure-hello-world-using-graal-vm.md
Last active March 14, 2019 12:42
How To Speed Up Clojure Hello World 100x Using GraalVM

How To Speed Up Clojure Hello World 100x Using GraalVM

Performance

Version Command Time (seconds)
Java time java -jar target/fastclj-1.0-standalone.jar 1.354
GraalVM time ./fastclj-1.0-standalone 0.014

Details

<!DOCTYPE html>
<html>
<head>
<title>JavaScript file upload</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="https://wzrd.in/standalone/buffer"></script>
<script src="https://unpkg.com/ipfs-api@9.0.0/dist/index.js"
integrity="sha384-5bXRcW9kyxxnSMbOoHzraqa7Z0PQWIao+cgeg327zit1hz5LZCEbIMx/LWKPReuB"
crossorigin="anonymous"></script>
</head>
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"