Skip to content

Instantly share code, notes, and snippets.

@rmorshea
rmorshea / reactpy.html
Created July 9, 2023 22:15
ReactPy + PyScript
<html>
<head>
<title>ReactPy</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body>
<div id="root"></div>
<py-config>
@yorickdowne
yorickdowne / HallOfBlame.md
Last active April 10, 2025 02:54
Great and less great SSDs for Ethereum nodes

Overview

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 the [pre-merge history expiry](https://hackmd.io/@hBXHLw_9Qq2va4pRt

Обращение к российским IT-специалистам

Коллеги! Армия Путина вторглась в Украину под предлогом «денацификации» и ведёт там грязную войну. У многих из нас есть коллеги из Украины, с которыми можно пообщаться и убедиться в том, что никакого «освобождения» от Путина им не нужно.

Многим из нас сейчас страшно. Но открытое письмо нашей индустрии против этой войны собрало уже более 30 000 подписей. Нас много, и мы уверены, что это не предел.

Правительству тоже страшно: страшно потерять нас. А значит, действия каждого из нас могут помочь прекратить это безумие.

Что делать

@abdollahpour
abdollahpour / README.md
Last active September 16, 2024 19:21
Install Knative on K3S

Install multipass

https://multipass.run/

Create virtual machine

multipass launch --mem 10G --cpus 6 --disk 20G --name knative
multipass shell knative

Install K3S

@rafi
rafi / k3d-istio.md
Last active August 16, 2023 11:29
K3d and Istio (Service Mesh - Governing the data plane)

K3d and Istio

Prerequisites

Ensure docker, k3d and istioctl installed.

brew update
brew install --cask docker
brew install k3d istioctl
@deefdragon
deefdragon / migrate.configmap.yaml
Last active February 10, 2025 09:21
Migrating Kubernetes PVC/PVs from one storage class to another
apiVersion: v1
kind: ConfigMap
metadata:
# any name can be used; Velero uses the labels (below)
# to identify it rather than the name
name: change-storage-class-config
# must be in the velero namespace
namespace: velero
# the below labels should be used verbatim in your
# ConfigMap.
@yankcrime
yankcrime / k3s-aws-cloud-provider.md
Last active January 4, 2025 20:02
Auto-deploying the external AWS Cloud Provider when bootstrapping K3s

Installing K3s with the external ("out-of-tree") AWS Cloud Provider

Pre-requisites

Refer to the upstream project's official documentation for the various pre-requisites. You must have an IAM role with the right permissions attached to your K3s instances, and you must also tag your nodes with a clusterid. Refer to the Rancher documentation for how to do this

Install K3s with the following options:

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server \
@ddanier
ddanier / fastapi_globals.py
Last active December 4, 2024 08:16
flask.g for FastAPI.
"""
This allows to use global variables inside the FastAPI application using async mode.
# Usage
Just import `g` and then access (set/get) attributes of it:
```python
from your_project.globals import g
@98lenvi
98lenvi / Create website in darkweb.md
Last active March 10, 2025 17:38
steps to host dark web website

Create your own site in the dark web.

There is a lot of misconception around the dark web, and most of the people think that it is not possible to create their own website on Dark web (The Onion network). Today we will set up a website in the Onion/Tor network for free.

Screenshot of my dark website

As you can see above, I have created my own website in the Tor network, and I've accessed it using the Tor Browser.

This tutorial consists of three steps

@edelooff
edelooff / expression.py
Created June 12, 2020 22:50
Evaluating SQLAlchemy expressions in Python (for ORM objects and such)
from __future__ import annotations
import operator
from collections import deque
from enum import Enum, auto
from typing import Any, Dict, Iterator, NamedTuple, Optional, Tuple
from sqlalchemy import Column
from sqlalchemy.sql import operators
from sqlalchemy.sql.elements import (