Skip to content

Instantly share code, notes, and snippets.

@samczsun
samczsun / README.md
Last active February 1, 2024 20:34
SEAL 911 Members

This document has been moved!

@0age
0age / c000r.sol
Last active January 20, 2023 04:31
0xMonaco car (top-ranked finisher by ELO, Paradigm CTF 2022) https://0xmonaco.ctf.paradigm.xyz/viewTeam/OpenSea
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16; // (10M optimization runs)
interface MonacoInterface {
struct CarData {
uint32 balance; // Where 0 means the car has no money.
uint32 speed; // Where 0 means the car isn't moving.
uint32 y; // Where 0 means the car hasn't moved.
Car car;
}
@arthurgousset
arthurgousset / _lessons-on-operating-in-a-downturn.md
Last active August 4, 2022 13:08
💡 Lessons on operating in a downturn
@fxfactorial
fxfactorial / example.go
Created February 14, 2022 16:22
ABI encode struct in golang
package main
import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)
@hrkrshnn
hrkrshnn / generic.org
Last active April 21, 2024 01:51
Some generic writeup about common gas optimizations, etc.

Upgrade to at least 0.8.4

Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!

The advantages of versions 0.8.* over <0.8.0 are:

  • Safemath by default from 0.8.0 (can be more gas efficient than some library based safemath).
  • Low level inliner from 0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
@fxfactorial
fxfactorial / faucet.js
Created July 4, 2021 00:58
suck faucets
const puppeteer = require('puppeteer');
const spawn = require('@expo/spawn-async');
const v4 = require('uuid').v4;
const UserAgent = require('user-agents');
const faucet = 'https://explorer.certik.foundation/faucet';
const address_query = 'input[name=address]';
const button_click = 'form button[type=submit]';
@moritzebeling
moritzebeling / p5js-pong.js
Last active February 11, 2024 13:12
p5.js Pong
/**
* requires p5.js
* try out at https://editor.p5js.org
*/
let ball = {
x: 300,
y: 150,
radius: 10,
speed: {
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 7, 2024 08:28
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }