Skip to content

Instantly share code, notes, and snippets.

Gas Fee Models on EVM Chains

Chain Type Min Tx Gas Model Explanation
Arbitrum Optimistic Rollup 35-70k Multifunctional gas limit Bake L1 data fee into L2 gas limit
BNB Chain Sidechain 21k EVM Same as vanilla EVM
Gnosis Sidechain 21k EVM Same as vanilla EVM
OP Stack Optimistic Rollup 21k L1 fee fields New transaction fields for L1 gas limits and L1 prices
Polygon Sidechain 21k EVN Sa
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 17, 2024 14:50
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active May 17, 2024 14:50
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@CoolElectronics
CoolElectronics / chromeos-117-sudo-howto.md
Last active May 17, 2024 14:49
Re-Enable sudo from crosh on R117+ Chrome OS without recompiling

Short guide on how to bypass this:

image

If you haven't disabled rootfs verification, switch to vt-2 and run /usr/libexec/debugd/helpers/dev_features_rootfs_verification. Then reboot.

Inside crostini, download minioverride.c and compile it with gcc minioverride.c -o minioverride.so -shared (make sure gcc is installed)

In the files app, move minioverride.so into your downloads folder.

import time
import os
import logging
import random
from datasets import load_dataset
class QuantAutoGPTQ:
def __init__(self, model_name_or_path, output_dir, dataset,
num_samples=128, trust_remote_code=False, cache_examples=True,
use_fast=True, use_triton=False, bits=[4], group_size=[128], damp=[0.01],
@manzt
manzt / my-ts-monorepo.md
Last active May 17, 2024 14:47
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@thefish
thefish / utf8-win1251
Created May 21, 2013 08:31
JS utf-8 to windows-1251 string converter
//utf8 to 1251 converter (1 byte format, RU/EN support only + any other symbols) by drgluck
function utf8_decode (aa) {
var bb = '', c = 0;
for (var i = 0; i < aa.length; i++) {
c = aa.charCodeAt(i);
if (c > 127) {
if (c > 1024) {
if (c == 1025) {
c = 1016;
} else if (c == 1105) {
@natyusha
natyusha / Naty's FFXIV Endwalker Add-ons, Plugins and Mods.md
Last active May 17, 2024 14:44
All the third party add-ons, plugins and mods I use for FFXIV.

Last Updated: Patch 6.58

The program which most people use for parsing in FFXIV and several other MMOs. For an open source alternative consider using IINACT though configuring it won't be covered here.

Options

  • Main Table Encounters
    • General
      • Uncheck: Number of seconds to wait after the last combat action to begin a new encounter.
      • Uncheck: Number of seconds to wait after the last combat action to pause the encounter duration.

Plugins

@simzou
simzou / README.md
Last active May 17, 2024 14:43
US Map of Nielsen Media Markets
@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active May 17, 2024 14:43
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.