Skip to content

Instantly share code, notes, and snippets.

View sambacha's full-sized avatar
:atom:

sam bacha sambacha

:atom:
View GitHub Profile
@sambacha
sambacha / _callAndCheckStatusWithSkip.sol
Created September 19, 2024 12:38
function to check call and check status
pragma solidity ^0.8.16;
// source: <https://github.com/ProjectOpenSea/seaport-1.6/pull/15/files#diff-ab41cad2b3281c1a0aaf991d5cc5e1b881ce7379c3b96906d2a8529ff90489d5R365-R447>
//
/**
* @dev Calls the specified target with the given data and checks the status
* of the call. Revert reasons will be "bubbled up" if one is returned,
* otherwise reverting calls will throw a generic error based on the
* supplied error handler.
#!/usr/bin/env bash
set -euo pipefail
command -v sed >/dev/null 2>&1 || { echo >&2 "sed is not installed, aborting."; exit 1; }
BASE_COMMIT=${1:-}
TARGET_COMMIT=${2:-}
FORMATTING_COMMAND='make formatf'
USAGE="

Your is the single biggest render-blocking part of your page—ensuring it is well-formed is critical. ct.css is a diagnostic CSS snippet that exposes potential performance issues in your page’s tags.

Drag and drop the following link to your bookmarks bar (or click for simple demo): ct.css.

@sambacha
sambacha / transaction_mempool_ordering.mmd
Created August 17, 2024 00:39
Transaction Pool Ordering for Ethereum Clients
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#611F69,#243806,#729C1A,#C474D3
"editor.tokenColorCustomizations": {
"[*Light*]": {
"textMateRules": [
{
"scope": "ref.matchtext",
"settings": {
"foreground": "#000"
}
}
]
import os
import requests
import sys
def check_dependency_availability(dependency):
"""
Checks if a given dependency is available on PyPI.
:param dependency: The name of the dependency to check.
:return: A tuple containing the dependency and a boolean indicating availability.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"Ansi 0 Color": {
"Red Component": 0.384313725490196,
"Green Component": 0.447058823529412,
"Blue Component": 0.643137254901961
},
"Ansi 1 Color": {
"Red Component": 0.909803921568627,
"Green Component": 0.235294117647059,
"Blue Component": 0.415686274509804
https://hackmd.io/@sbacha/ryiSOWv-3