Skip to content

Instantly share code, notes, and snippets.

View Herts's full-sized avatar
🏠
Working from home

Hanzhe Li Herts

🏠
Working from home
View GitHub Profile
@Herts
Herts / limitGoroutines.go
Created September 22, 2019 14:26
This is an example of using a buffered channel to limit the number of goroutines running at the same time. It will start a server locally listening port 9988, so if there is a warning from firewall on windows, allow it. This, I think, is very useful when scraping the Internet if you want to limit the concurrent connections.
package main
import (
"fmt"
"html"
"io/ioutil"
"log"
"net/http"
"sync"
"time"
@Herts
Herts / Install go-oci8 on Windows.md
Created August 15, 2019 05:59
Install go-oci8 on 64-bit Windows
@Herts
Herts / gist:b8237bf96238e4e631318cdba7433440
Created May 15, 2019 22:04 — forked from pwlin/gist:8a0d01e6428b7a96e2eb
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
04353f76e6ac22437d310c674c5d91e81913c60c89b04f86bda86951f672edc119f644f7d9abb37cd5a7076023e16c3dd5eb151de0b1f740b812fd3f2c509e7675;sun1534