Moved to a repo at https://github.com/Geczy/coolify-migration
This Python function, json_comquotes
, is a handy tool for preprocessing JSON data that contains unescaped quotes within string values. It takes a JSON string as input and transforms it by replacing the double and single quotes within the string values with alternative characters, allowing you to parse the JSON data without errors.
Take a look into json_esquotes
- Replaces double quotes
"
within string values with escaped double quotes\"
.
/* This script auto-generates a Google OAuth token from a Service Account key, | |
* and stores that token in accessToken variable in Postman. | |
* | |
* Prior to invoking it, please paste the contents of the key JSON | |
* into serviceAccountKey variable in a Postman environment. | |
* | |
* Then, paste the script into the "Pre-request Script" section | |
* of a Postman request or collection. | |
* | |
* The script will cache and reuse the token until it's within |
Syncing an Ethereum node is largely reliant on latency and IOPS, I/O Per Second, of the storage. Budget SSDs will struggle to an extent, and some won't be able to sync at all. IOPS can roughly be used as proxy of / predictor for latency. Measuring latency directly is arguably better.
This document aims to snapshot some known good and known bad models.
The drive lists are ordered by interface and then by capacity and alphabetically by vendor name, not by preference. The lists are not exhaustive at all. @mwpastore linked a filterable spreadsheet in comments that has a far greater variety of drives and their characteristics. Filter it by DRAM yes, NAND Type TLC, Form Factor M.2, and desired capacity.
For size, 4TB is a very conservative choice. The smaller 2TB drive should last an Ethereum full node until at least sometime 2026, with [pre-merge history expiry](https://hackmd.io/@hBXHLw_9Qq2va4pRtI4bI
<?php | |
/* | |
Plugin Name: EWWW IO Adjust Sharpening | |
Version: 1.0.0 | |
*/ | |
/* | |
* Valid options: | |
* 'FILTER_POINT', | |
* 'FILTER_BOX', |
Note: PBSS in Geth >=1.13.0 removes the need to prune manually.
Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.
import argparse | |
import json | |
from random import randrange | |
from typing import List, Optional, Sequence | |
from urllib.parse import urljoin | |
import requests | |
from eth_account import Account | |
from eth_account.signers.local import LocalAccount | |
from hexbytes import HexBytes |
# | |
# This small example shows you how to access JS-based requests via Selenium | |
# Like this, one can access raw data for scraping, | |
# for example on many JS-intensive/React-based websites | |
# | |
from time import sleep | |
from selenium import webdriver | |
from selenium.webdriver import DesiredCapabilities |
<?php | |
/* | |
Core WordPress function wp_is_mobile() detects iPad as mobile, so we filter it and use WP Rocket mobile detection | |
*/ | |
add_filter( 'wp_is_mobile', 'fv_bra_wp_is_mobile' ); | |
function fv_bra_wp_is_mobile( $is_mobile ) { | |
if ( class_exists( 'Rocket_Mobile_Detect' ) ) { | |
$detect = new Rocket_Mobile_Detect(); |
import random | |
def danger(): | |
if random.choice([True, False]): | |
raise Exception | |
def main(): | |
"""Attempt to loop `loop_count` times. Simulate random errors and create a |