Skip to content

Instantly share code, notes, and snippets.

@chenws1012
chenws1012 / CircleBloomFilter.java
Last active August 31, 2022 08:31
Circle BloomFilter #BloomFilter
package com.xxx.util;
import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnels;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
@chenws1012
chenws1012 / ServiceContextHolder.java
Last active June 16, 2023 09:54
#HystrixRequestContext
import com.netflix.hystrix.strategy.concurrency.HystrixRequestContext;
import com.netflix.hystrix.strategy.concurrency.HystrixRequestVariableDefault;
import java.util.Map;
/**
* @author [email protected] on 2023/5/16
*
* In order to pass request context to a FeignClient thread.
*/
@chenws1012
chenws1012 / nacos_sync.py
Created July 19, 2024 07:56
Nacos sync python Implementation
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
同步 nacos 服务
Version: 0.2
Author: WenShun Chen
ref api:https://nacos.io/zh-cn/docs/open-api.html
"""