View swift-docker.sh
docker run --privileged --cap-add sysptrace -it --rm swift swift
View UdpEchoClient.cs
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;
async Task Main()
{
var remoteEndPoint = new IPEndPoint(IPAddress.Loopback, 6000);
TaskScheduler.UnobservedTaskException += (sender, e) => {
e.Dump();
};
View CSharpAsyncAwait.cs
async Task Main()
{
var client = new HttpClient();
await Task.WhenAll(Enumerable.Range(0, 100).Select(x => client.GetStringAsync("https://google.com")));
}
View ChangeExtension.ps1
# All Files
Get-ChildItem | where {-not $_.PSIsContainer} | %{Rename-Item -Path $_ -NewName ($_.BaseName + ".json")}
# Only .txt files
Get-ChildItem | where Extension -eq ".txt" | %{Rename-Item -Path $_ -NewName ($_.BaseName + ".json")}
# .NET
Get-ChildItem | where Extension -eq ".txt" | %{[PSCustomObject]@{Path=$_;NewName=[System.IO.Path]::ChangeExtension($_.FullName, ".json")}} | %{Rename-Item -Path $_.Path -NewName $_.NewName}
View .bashrc
net_tools_deprecated_message () {
echo -n 'net-tools コマンドはもう非推奨ですよ?おじさんなんじゃないですか? '
}
arp () {
net_tools_deprecated_message
echo 'Use `ip n`'
}
ifconfig () {
net_tools_deprecated_message
View VSCode.WorkSpace.Settings.REView.json
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
"git.autofetch": true,
"git.enableSmartCommit": true,
"workbench.colorCustomizations": {
"activityBar.background": "#99CCFF"
}
}
View oneline_timezone_aws_ntpservice.cmd
tzutil /s "Tokyo Standard Time" & reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f & net stop w32time & w32tm /config /syncfromflags:manual /manualpeerlist:"169.254.169.123" & w32tm /config /reliable:yes & net start w32time
View dotnet-core-msbuild-info.md
View DetectCharset.cs
void Main()
{
DetectEncodings(Directory.EnumerateFiles(@"PATH to your project", "*.cs", SearchOption.AllDirectories)
.Where(x => !x.Contains(@"\bin\") && !x.Contains(@"\obj\")))
.Where(x => x.Charset != "UTF-8" && x.Charset != "ASCII" && x.Charset != null)
.Dump();
}
IEnumerable<(string Path, string Charset)> DetectEncodings(IEnumerable<string> paths)
{
View Library再生成やSwitch Platform の高速化対応のために Compress Assets on Importを外す試み.md

Environment

Unity 5.6.3p2 (Windows 10 64bit)

Result

  • Switch Platform : false で 418sec -> 35sec に高速化 (x11.9)
  • Library Re-Import : No Change
  • Switch Compress Assts on Import Option : false にすることに時間はかからないけど、true に戻すときに再Compressかかったので注意いる感