Skip to content

Instantly share code, notes, and snippets.

View wangengzheng's full-sized avatar
👻

zheng wangengzheng

👻
  • internet
View GitHub Profile
@wangengzheng
wangengzheng / centos_install_ngrok.sh
Last active June 5, 2021 09:21 — forked from davidneelin/centos_install_ngrok.sh
a script that auto install ngrok in centos
#!/bin/bash
if [[ $# -lt 1 ]]; then
echo "usage: $0 domain"
exit 0
else
domain=$1
echo "domain is ${domain}"
fi
@christiannagel
christiannagel / UseClientHandlerSample.cs
Created June 8, 2018 08:02
Add a HttpClientHandler to a HTTP Client Factory configuration
private ServiceProvider ConfigureServices()
{
var services = new ServiceCollection();
services.AddLogging(builder =>
{
builder.AddFilter((category, level) => true);
builder.AddConsole(options => options.IncludeScopes = true);
});
services.AddHttpClient("cni", client =>
{
@clintongormley
clintongormley / load_test_data.sh
Last active January 5, 2024 07:32
Run these commands in your shell to setup the test data for Chapter 5
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d '
{
"email" : "john@smith.com",
"name" : "John Smith",
"username" : "@john"
}
'
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d '
{