Skip to content

Instantly share code, notes, and snippets.

View cre-mer's full-sized avatar
:atom:
Voll-Strack Developer

Jonas Merhej cre-mer

:atom:
Voll-Strack Developer
View GitHub Profile
@cre-mer
cre-mer / Proving a List is Sorted in Ascending Sequence
Created August 7, 2024 12:51
Circuit to prove that a list is sorted in an ascending sequence using only addition, multiplication, and equality checks
sorted_list = [3, 9, 10, 404, 1337]
unsorted_list = [3, 9, 10, 1337, 404]
# define default constant
MAX = 4
def decimal_to_binary(dec, max = MAX):
"""
convert a decimal number `dec =< max` to binary, returning each binary index as a list
"""
@cre-mer
cre-mer / README.md
Last active October 11, 2022 21:18
JavaScript snippet to run from the browser console in https://faucet.polygon.technology/ to auto recharge an address.

How to

  1. Go to https://faucet.polygon.technology/
  2. Paste your address
  3. Copy and paste the script in the browser console
  4. Press enter and enjoy

Notes

Loop runs max 20 times. The faucet funds 0.5 MATIC each time and the faucet doesn't fund if address balance is bigger than 10 MATIC. After 20 runs an alert pops up with the message that it's done.

Attention