Skip to content

Instantly share code, notes, and snippets.

View qinlili23333's full-sized avatar
⛏️
Deadline Fighter

琴梨梨OvO qinlili23333

⛏️
Deadline Fighter
View GitHub Profile
@dalexsoto
dalexsoto / HttpClientProgressExtensions.cs
Last active April 3, 2024 15:01
Add Progress reporting to capabilities to HttpClient
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace HttpClientProgress {
public static class HttpClientProgressExtensions {
public static async Task DownloadDataAsync (this HttpClient client, string requestUrl, Stream destination, IProgress<float> progress = null, CancellationToken cancellationToken = default (CancellationToken))
{
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active April 15, 2024 07:22
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com