Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View m3ngyang's full-sized avatar
🐾
Seeking

Yang m3ngyang

🐾
Seeking
  • Singapore
View GitHub Profile
@m3ngyang
m3ngyang / redisearch_knn_benchmark.go
Last active October 7, 2022 11:02
Redisearch KNN benchmark
package main
import (
"context"
"encoding/binary"
"fmt"
"math"
"math/rand"
"testing"
"time"
@m3ngyang
m3ngyang / SimpleHTTPServerWithUpload.py
Created January 6, 2019 06:14 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@m3ngyang
m3ngyang / upgrade_python.sh
Created February 3, 2018 00:53 — forked from sacreman/upgrade_python.sh
Centos 6 upgrade to Python 2.7
#!/usr/bin/env bash
# install build tools
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
# install python 2.7 and change default python symlink
sudo yum install python27-devel -y
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
@m3ngyang
m3ngyang / sshd.go
Created July 18, 2017 08:13 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@m3ngyang
m3ngyang / tls-client.go
Created June 16, 2017 04:15 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)