Skip to content

Instantly share code, notes, and snippets.

@MarioPoneder
MarioPoneder / REVIEW.md
Last active June 12, 2025 19:33
Mitigation review: Olas Lockbox v2 (after Cantina campaign)

Mitigation review

Project: Olas Lockbox v2 (after Cantina campaign)
Commit: 0c652b0528dc522f92b7191862897cbbe8f159f9
Start Date: 2024-03-08

Scope of mitigation measures to review:

  • PR 13 - Adding vulnerabilities doc for lockbox2 specified by the Cantina audit findings.
  • PR 14 - Addressing sandwich attack fix in the deposit() function
  • PR 15 - Addressing small Cantina audit findings
@mahemoff
mahemoff / README.md
Last active October 24, 2025 20:08
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

// To enable meta transaction, let create a generic method that calls executeMetaTransaction by taking the user signature
// and then execute transaction via Biconomy
// Dependencies
import {toBuffer} from "ethereumjs-util";
import abi from "ethereumjs-abi";
import events from "events";
// Initialization of web3
let web3 = new Web3(window.ethereum);
@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active August 3, 2025 12:18
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@meagtan
meagtan / galois.c
Last active December 10, 2025 23:31
Quick implementation of Galois fields
/*
* The following is an implementation of the finite field GF(2^8) as bit vectors of length 8, where the nth bit represents the
* coefficient of the nth power of the generator in each element, and the generator satisfies the minimal polynomial
* x^8 + x^4 + x ^3 + x^2 + 1 in the prime field Z_2, in which addition is equivalent to XOR and multiplication to AND.
* The elements of GF(2^8) thus represent polynomials of degree < 8 in the generator x. Addition in this field is simply
* bitwise XOR, but multiplication requires the elimination of powers of x <= 8.
*/
#include <stdio.h>
#include <stdint.h>