Skip to content

Instantly share code, notes, and snippets.

@overing
overing / VCSAssemblyTitleRewrite.targets
Last active April 6, 2020 13:46
Add VCS Info To AssemblyTitle for dotnet core sdk (.svn/.git only)
<Project>
<!-- MSBuildRuntimeType: cond check for omnisharp-vscode support problem -->
<Target Condition=" '$(OS)' == 'Windows_NT' AND '$(MSBuildRuntimeType)' == 'Core' " Name="RewriteAssemblyTitle" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<TimeText>UTC $([System.DateTime]::UtcNow.ToString('yyyy/MM/dd HH:mm:ss'))</TimeText>
</PropertyGroup>
<FindVCSInfoTarget Condition=" '$(VCSInfoTarget)' == '' OR !EXISTS( $(VCSInfoTarget) ) " CurrentDirName="$(ProjectDir)">
<Output TaskParameter="DirectoryInParent" PropertyName="VCSInfoTarget" />
</FindVCSInfoTarget>
@overing
overing / HighResolutionTimer.cs
Created September 3, 2019 08:04 — forked from DraTeots/HighResolutionTimer.cs
HighResolutionTimer for .NET
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
using System.Threading;
namespace HighResolutionTimer
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityGoogleDrive; // https://github.com/Elringus/UnityGoogleDrive
public class GoogleDriveTest : MonoBehaviour
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
static void AfterSceneLoad()
@overing
overing / CsEvalHost.cs
Last active November 8, 2019 02:57
透過 C# Eval() 套件在 IL2CPP 環境動態執行展示
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using GameDevWare.Dynamic.Expressions;
using GameDevWare.Dynamic.Expressions.CSharp;
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Microsoft.EntityFrameworkCore
{
delegate object[] KeySelector(object entry);
using System;
using System.Collections.Generic;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
namespace Benchmarks
{
/*
@overing
overing / ThisWorkbook.cls
Last active February 7, 2020 09:59
Output xls file sheets to csv (excel vba/bat call vbs)
Set FSO = CreateObject("Scripting.FileSystemObject")
Sub 掃描工作目錄檔案() '表單上面放按鈕或是用 [Alt]+[F8] 啟動巨集
inputFolderPath = PickFolder(ThisWorkbook.Path, "Select folder for search xls/xlsx/xlm")
If inputFolderPath = "" Then Exit Sub
outputFolderPath = PickFolder(inputFolderPath, "Select folder for output sheets as csv")
If outputFolderPath = "" Then Exit Sub
Execute inputFolderPath, outputFolderPath
End Sub
@overing
overing / MainForm.cs
Created April 22, 2020 20:46
WinForms Task Anime Demo
using System;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WinFormTaskAnimeDemo
{
public sealed class MainForm : Form
{
@overing
overing / AsymmetricCryptographyDemo.cs
Last active April 28, 2020 15:06
非對稱加密展示 (非對稱包對稱)
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace FY.Cryptography
{
/// <summary>
/// 非對稱加密工具 (非對稱算法包裝對稱算法)
///
@overing
overing / CrossFromsDemo.cs
Last active July 1, 2020 03:46
WinForms 跨窗傳動事件範例
using System;
using System.Windows.Forms;
namespace CrossFromsDemo
{
static class Program
{
[STAThread]
static void Main()
{