Skip to content

Instantly share code, notes, and snippets.

@qdongxu
qdongxu / chan_atomic_mutex.go
Created October 19, 2024 12:52
A baseline performance test with the chan, atomic and mutex in go.
/*
* A baseline performance test with the chan, atomic and mutex in go.
*/
package main
import (
"flag"
"fmt"
"runtime"
"sync"
@qdongxu
qdongxu / http_proxy.go
Created October 1, 2023 00:02 — forked from jim3ma/http_proxy.go
Register Dialer Type for HTTP&HTTPS Proxy in golang
package main
import (
"bufio"
"fmt"
"net"
"net/http"
"net/url"
"crypto/tls"
package com.example;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class CompetitionMain {
private static List<Competition> competList = new ArrayList<>();
public static void main(String[] args) {
@qdongxu
qdongxu / es_clean.py
Created June 9, 2022 15:09
clean overdue elasticsearch indices
#!/usr/bin/env python3
import requests, re, sys
from datetime import datetime
from datetime import timedelta
import syslog
overdue_days = int(sys.argv[1])
es_url = sys.argv[2]
@qdongxu
qdongxu / md5_benchmark.go
Last active August 20, 2019 03:23
md5 benchmark
package main
import (
"crypto/md5"
"fmt"
"io"
"sync"
"sync/atomic"
"time"
)