Skip to content

Instantly share code, notes, and snippets.

View WeihanLi's full-sized avatar
🐞

Weihan Li WeihanLi

🐞
View GitHub Profile
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@WeihanLi
WeihanLi / dotnet-format-action.yml
Created December 10, 2021 00:27 — forked from rickyah/dotnet-format-action.yml
Runs dotnet-format on every PR and create a commit that fixes the formatting if it doesn't comply with your code convention
name: Format check on pull request
on: pull_request
jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2.2.0
with:
fetch-depth: 0
@WeihanLi
WeihanLi / TextFileEncodingDetector.cs
Created March 6, 2019 08:03 — forked from TaoK/TextFileEncodingDetector.cs
Simple class to automatically detect text file encoding, with English-biased "best guess" heuristic based on byte patterns in the absence of BOM.
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
namespace KlerksSoft
{
public static class TextFileEncodingDetector
{
/*