Skip to content

Instantly share code, notes, and snippets.

View ygxxii's full-sized avatar

ygXXII ygxxii

View GitHub Profile
@benhoyt
benhoyt / goversions.txt
Created April 13, 2024 04:54
Go version performance - table of results
| Go version | binary size (MB) | countwords (s) | sumloop (s) |
| ---------- | ---------------- | -------------- | ----------- |
| 1.0 | 3.27 | 8.20 | 9.47 |
| 1.1 | 3.95 | 7.57 | 9.54 |
| 1.2 | 5.50 | 25.51 | 9.36 |
| 1.3 | 4.27 | 2.85 | 1.99 |
| 1.4 | 4.32 | 3.03 | 2.13 |
| 1.5 | 4.73 | 2.16 | 1.16 |
| 1.6 | 4.70 | 2.15 | 1.18 |
| 1.7 | 3.94 | 1.86 | 0.63 |
@benhoyt
benhoyt / goversions.py
Created April 13, 2024 04:53
Measure Go version performance with GoAWK
import csv
import os
import subprocess
import time
print('| Go version | binary size (MB) | countwords (s) | sumloop (s) |')
print('| ---------- | ---------------- | -------------- | ----------- |')
@padeoe
padeoe / README_hfd.md
Last active March 19, 2026 06:41
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Note

(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
@ConteMan
ConteMan / editor.css
Created October 1, 2022 16:38
Obsidian plugin. Better Command Palette. Simple style.
/* Better Command Palette */
.better-command-palette .better-command-palette-title {
display: none;
}
.suggestion-prefix:after {
content: ": ";
}
.better-command-palette .suggestion-item {
display: flex;
flex-wrap: wrap;
@eleanorkonik
eleanorkonik / readwise-settings.md
Last active February 10, 2026 19:25
Eleanor's Readwise Settings

File name

{{title|replace("#","")|replace("?","")|replace(".","")|replace(""","")|replace(""","")|replace("'","")|replace("'","")|truncate(127)}} by {{author|truncate(120)}} - Notes

I do this so that weird characters or overly-long file names don't break dropbox or git, tho Readwise now natively sanitizes things.

Page metadata

@JamesHopbourn
JamesHopbourn / douyin.txt
Last active March 25, 2025 15:21
抖音、快手等软件 DNS 域名污染,局域网内屏蔽相关流量
set system static-host-mapping host-name aaid.umeng.com inet 127.0.0.1
set system static-host-mapping host-name abtest-ch.snssdk.com inet 127.0.0.1
set system static-host-mapping host-name activity-aghbwh.awemeughun.com inet 127.0.0.1
set system static-host-mapping host-name ai.login.umeng.com inet 127.0.0.1
set system static-host-mapping host-name api1.kuaishoupay.com inet 127.0.0.1
set system static-host-mapping host-name api3-core-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api3-normal-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api5-core-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api5-normal-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api100-core-c333.amemv.com inet 127.0.0.1
@NiKiZe
NiKiZe / dnsmasq.conf
Last active September 17, 2025 16:38
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * 10.1.1.0 - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * 10.1.1.2 - your tftp server ip
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE
# Debug logging
log-debug
@RhetTbull
RhetTbull / uti.csv
Created June 28, 2021 04:10
A CSV list of Apple macOS Universal Type Identifiers (UTIs) and associated extensions & MIME types. Generated programmaticaly with calls to UTTypeCreatePreferredIdentifierForTag (https://developer.apple.com/documentation/coreservices/1448939-uttypecreatepreferredidentifierf)
extension UTI preferred_extension MIME_type
c public.c-source c None
f public.fortran-source f None
h public.c-header h None
i public.c-source.preprocessed i None
l public.lex-source l None
m public.objective-c-source m None
o public.object-code o None
r com.apple.rez-source r None
s public.assembly-source s None
@barmic
barmic / HealthCheck.java
Last active February 16, 2025 22:49
Healthcheck
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class HealthCheck {
public static void main(String[] args) {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()