Skip to content

Instantly share code, notes, and snippets.

View liyuntao's full-sized avatar

dust_jead liyuntao

View GitHub Profile
@Object905
Object905 / dns-discovery.rs
Last active December 5, 2025 17:11
Pingora kubernetes/DNS ServiceDiscovery
use async_trait::async_trait;
use hickory_resolver::TokioAsyncResolver;
use http::Extensions;
use pingora::lb::discovery::ServiceDiscovery;
use pingora::lb::selection::{BackendIter, BackendSelection};
use pingora::lb::{Backend, Backends, LoadBalancer};
use pingora::protocols::l4::socket::SocketAddr;
use pingora::{Error, ErrorSource, ErrorType, Result as PingoraResult};
use std::fmt::Debug;
use std::net::{IpAddr, SocketAddrV4};
@Hakky54
Hakky54 / cheat_sheet_http_client_ssl_configuration_for_java_kotlin_scala.md
Last active November 4, 2025 14:33
Cheat Sheet - Http Client SSL TLS Configuration for Java Kotlin and Scala with example http requests

Understanding Comparative Benchmarks

I'm going to do something that I don't normally do, which is to say I'm going to talk about comparative benchmarks. In general, I try to confine performance discussion to absolute metrics as much as possible, or comparisons to other well-defined neutral reference points. This is precisely why Cats Effect's readme mentions a comparison to a fixed thread pool, rather doing comparisons with other asynchronous runtimes like Akka or ZIO. Comparisons in general devolve very quickly into emotional marketing.

But, just once, today we're going to talk about the emotional marketing. In particular, we're going to look at Cats Effect 3 and ZIO 2. Now, for context, as of this writing ZIO 2 has released their first milestone; they have not released a final 2.0 version. This implies straight off the bat that we're comparing apples to oranges a bit, since Cats Effect 3 has been out and in production for months. However, there has been a post going around which cites various compar

@snower
snower / check_ip.py
Last active December 28, 2021 09:57
check_ip
# -*- coding: utf-8 -*-
#14-6-6
# create by: snower
import struct
from collections import defaultdict
import socket
default_networds = (
@Lokathor
Lokathor / magic_macro.md
Last active December 8, 2019 15:46
Blog post about how to build `cfg_if` style macro.

Diving in to cfg_if!

How exactly does the cfg_if! macro do its thing?

First of all what is the cfg_if! macro? It's a macro to help you pick a set of code based on compile-time configutation. There is a sample usage on the docs page:

@ThaddeusJiang
ThaddeusJiang / interview report template (tech)
Last active August 28, 2024 14:42
Interview report template (tech)
Total: 1~5
下面各项得分的平均分
Experience: 1~5
过往项目的客户群(ToB or ToC)、项目规模、项目中担当的角色、是否有突出贡献等等
Skill: 1~5
开发基础、设计能力、能否攻克中大型开发难题,能否担当 full stack 任务等等
@dacr
dacr / index.md
Last active February 3, 2026 19:52
David's programming examples knowledge base / published by https://github.com/dacr/code-examples-manager #fecafeca-feca-feca-feca-fecafecafeca/8190d90bea59408fd7da77ad14c120cd28c92f71

David's programming examples knowledge base

akka-pekko

@pantsel
pantsel / docker-compose.yml
Last active October 2, 2025 02:21
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@superseb
superseb / README.md
Last active August 30, 2024 18:02
Deploy kubernetes-dashboard on Rancher 2.x cluster exposed using NodePort

Deploy kubernetes-dashboard on Rancher 2.x cluster exposed using NodePort

This has been updated to install Dashboard v2.0.0, see below for pre v2.0.0 instructions

Requirements

Step 1: Generate kubeconfig from the UI

Generate the kubeconfig file for your cluster using the Kubeconfig File button in the Cluster view of your cluster.

@swalkinshaw
swalkinshaw / tutorial.md
Last active January 5, 2026 14:33
Designing a GraphQL API