Skip to content

Instantly share code, notes, and snippets.

View zjuchenyuan's full-sized avatar

ChenYuan zjuchenyuan

View GitHub Profile
@yorickdowne
yorickdowne / HallOfBlame.md
Last active April 22, 2024 21:38
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on IOPS, I/O Per Second. Budget SSDs will struggle to an extent, and some won't be able to sync at all.

This document aims to snapshot some known good and known bad models.

For size, 4TB or 2TB come recommended as of mid 2024. A 2TB drive should last an Ethereum full node until late 2025 or thereabouts, with crystal ball uncertainty.

High-level, QLC and DRAMless are far slower than "mainstream" SSDs. QLC has lower endurance as well. Any savings will be gone when the drive fails early and needs to be replaced.

@0xYYY
0xYYY / RUG.md
Last active October 14, 2021 04:09
SaturnBeam Finance - A 10M USD RUG on Moonriver

A 10M USD RUG on Moonriver

Warning: The following analysis may contain incorrect information, please verify everything yourself before believing in these info.

Would be nice to have someone better in on-chain analysis to double check these.

Background

SatrunBeam Finance was a yield aggregator on Moonriver, a EVM-Compatible parachain on Kusama in the Polkadot ecosystem.

It attracted several millions of liquidity within a month. The team is anon and they claimed that the contracts are audited by BitRise whose domain name was only registered on 2022-08-22 (https://who.is/whois/bitriseaudits.com). And the contracts were never actually verified on the block explorer.

@mkornatz
mkornatz / cf-worker.js
Last active March 7, 2024 11:02
Cloudflare Workers CORS Proxy (supports websockets)
// We support the GET, POST, HEAD, and OPTIONS methods from any origin,
// and allow any header on requests. These headers must be present
// on all responses to all CORS preflight requests. In practice, this means
// all responses to OPTIONS requests.
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
}
@fonsecas72
fonsecas72 / gist:0ef04265a3d0c5822e5d441b8d2de1f8
Created January 11, 2021 16:39
Installing polipo on ubuntu 20.04 20.10
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/polipo/polipo_1.1.1-8_amd64.deb
sudo dpkg -i polipo_1.1.1-8_amd64.deb
"""
say you have a private repo, which is not suitable for push to github
but you want github to show your activity for this repo
so, this script will help you sync commit message to `githubrepo`, using empty commits
used commands:
git log --all '--pretty=format:%ad|%s'
git commit -m "message" --date "Sun Jun 17 12:48:07 2018 +0800" --allow-empty
"""
@ImSingee
ImSingee / jack.py
Created April 15, 2018 10:53
「加减大师」游戏攻略
import re
import json
from mitmproxy import ctx
from urllib.parse import quote
from pprint import pformat
def response(flow):
path = flow.request.path
if path == '/index/index_one_nine_two/make_question':
ctx.log.info('Start')
@magisterquis
magisterquis / demoshell.go
Last active April 1, 2024 12:12
Beaconing shell, useful for demos. Catch it with netcat.
// demoshell is a nifty beaconing shell useful for demos
package main
/*
* demoshell.go
* Simple reverse shell used in demos
* By J. Stuart McMurray
* Created 20180331
* Last Modified 20180331
*/
@fzls
fzls / batch_exchange.py
Last active May 8, 2019 14:43
cc98上发帖批量散魔力值的辅助脚本
import re
import requests
from bs4 import BeautifulSoup
# 赠送的网址(post)
exchange_url = "http://www.nexushd.org/mybonus.php?action=exchange"
# 98的帖子网址
cc98_url = "http://www.cc98.org/dispbbs.asp"
// 程序启动器[win32]
// 一个小玩意,作用就是读取与 exe 同名的 .config 文件,并逐条并行执行,不显示窗口
// 以 # 打头的行忽略
// 用于开机挂载一些自带 cmd 窗口的程序
// 自用 vs2017 编译测试通过
// ver 1.1
// 一个新语法:@命令 可以等待此命令结束后再继续运行
// 例如 @ping 127.1 -n 3 等待3秒
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 23, 2024 03:11
Hyperlinks in Terminal Emulators