Skip to content

Instantly share code, notes, and snippets.

View coconut49's full-sized avatar
🐰
Focusing

49 coconut49

🐰
Focusing
View GitHub Profile
@Xuanwo
Xuanwo / Dockerfile
Created June 26, 2025 03:14
xuanwo's dev container
FROM archlinux:latest
# Update system and install base dependencies
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm \
base-devel \
git \
curl \
wget \
vim \
@liuran001
liuran001 / config.yaml
Last active September 25, 2026 08:18
mihomo (Clash Meta) 懒人配置
# 21 世纪最伟大的发明是什么,那必然是 AI
# 所以如果你遇到什么问题,也许问 AI 比问人更快哦
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. ssLinks 邀请码: fSo2OhzH https://98a6251b6cd7471da86cca993b6dbe6f.36d.biz/#/register?code=fSo2OhzH 贵 快
# 2. 一元机场 邀请码: r3f1duds https://xn--4gq62f52gdss.top/#/register?code=r3f1duds 垃圾 但是便宜
# 3. Kitty 邀请码: MSOOG0Q0 https://kitty.fo/register?invite=MSOOG0Q0
# 4. BiuBiu 邀请码: fACfjKC8 https://biubiux.online/#/register?code=fACfjKC8 有年周期套餐
@yorickdowne
yorickdowne / HallOfBlame.md
Last active September 20, 2026 07:22
Great and less great SSDs for Ethereum nodes

Overview

Syncing an Ethereum node is largely reliant on latency 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 a proxy of / predictor for latency. Measuring latency directly is best.

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 (legacy sheet) 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 conservative choice which also supports a Fusaka "supernode". The smaller 2T

@imbushuo
imbushuo / simplevm.c
Last active September 19, 2026 10:38
Demonstrates Hypervisor.Framework usage in Apple Silicon
// simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon
// Based on the work by @zhuowei
// @imbushuo - Nov 2020
// To build:
// Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF
// Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON
// ^ Per @never_released, tested on 11.0.1, idk why
// clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c
// codesign --entitlements simplevm.entitlements --force -s - simplevm
@iAklis
iAklis / dying_cgroup.sh
Last active December 15, 2019 03:11
Proof of concept of dying cgroup and dirty slab.
#!/bin/bash
old_memcg_num=$(cat /proc/cgroups | awk '/memory/ {print $3}')
free -m
slabtop -o | head
echo "now the number of memory cgroup is $old_memcg_num"
echo "begin to create cgroups"
prefix=/sys/fs/cgroup/memory/aklis
@CAFxX
CAFxX / Colorized and formatted go tool objdump output.png
Last active July 7, 2023 17:51
Colorized and formatted go tool objdump output
Colorized and formatted go tool objdump output.png
@pandada8
pandada8 / dumpfolder.py
Last active March 6, 2021 00:43
dumpfolder
import requests
from requests_html import HTMLSession
import os
import sys
import urllib
from xmlrpc.client import ServerProxy
session = HTMLSession()
@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \