Skip to content

Instantly share code, notes, and snippets.

View ww898's full-sized avatar

Mikhail Pilin ww898

View GitHub Profile
@ww898
ww898 / gist:ec21d320aef4bf499d1b7def843a47be
Created February 15, 2024 09:05
Switch Ubunti to old repo
sed -i 's#http://ports.ubuntu.com/ubuntu-ports#http://old-releases.ubuntu.com/ubuntu#g' /etc/apt/sources.list
@ww898
ww898 / setup_freebsd-x64.sh
Last active February 13, 2024 23:13
Setup FreeBSD 14.0 x64
pkg update
pkg upgrade
pkg install --yes nano tmux htop mc git openjdk17 node
tee -a '/etc/fstab' <<EOF
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
EOF
@ww898
ww898 / setup_rhel.9-s390x.sh
Last active January 8, 2024 22:55
Setup Red Hut 9.1 s390x on LinuxONE OSS Community Cloud
# Required for .NET v7.0. See https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
sudo update-crypto-policies --set DEFAULT:SHA1
sudo yum upgrade -y
sudo yum clean packages -y
sudo yum install curl nano mc tmux git dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 java-17-openjdk nodejs
# No htop package in rhel.9, so install it from fedora.38
curl -fLO https://rpmfind.net/linux/fedora-secondary/releases/38/Everything/s390x/os/Packages/h/htop-3.2.2-2.fc38.s390x.rpm
@echo off
set _DotNet=E:\DotNetSdk80\dotnet.exe
set _PkgDir=E:\NuPkg\packages
if not exist "%_PkgDir%" mkdir "%_PkgDir%"
call :run net8.0 linux-arm64
call :run net8.0 linux-arm
call :run net8.0 linux-x64
if ($PSVersionTable.PSVersion.Major -lt 3) {
throw "PS Version $($PSVersionTable.PSVersion) is below 3.0."
}
Set-StrictMode -Version Latest
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
$script:VerbosePreference = "Continue"
$_BaseUrl="https://www.nuget.org/api/v2/package"
@echo off
set _DotNet=E:\DotNetSdk80\dotnet.exe
set _PkgDir=E:\NuPkg\packages
if not exist "%_PkgDir%" mkdir "%_PkgDir%"
call :run net8.0 linux-arm64
call :run net8.0 linux-arm
call :run net8.0 linux-x64
@ww898
ww898 / nuget_store.cmd
Last active October 19, 2023 10:18
Compile .NET project on Windows for all OSes
@echo off
set _DotNet=dotnet.exe
set _PkgDir=E:\NuPkg\packages
if not exist "%_PkgDir%" mkdir "%_PkgDir%"
call :run netcoreapp1.0 centos-x64
call :run netcoreapp1.0 debian.9-x64
call :run netcoreapp1.0 fedora.27-x64
@ww898
ww898 / CurrentVersion.txt
Created December 22, 2021 12:32
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
CurrentVersion REG_SZ 6.0
CurrentBuildNumber REG_SZ 6002
CurrentBuild REG_SZ 6002
SoftwareType REG_SZ System
CurrentType REG_SZ Multiprocessor Free
InstallDate REG_DWORD 0x58ac17aa
RegisteredOrganization REG_SZ
RegisteredOwner REG_SZ WW
SystemRoot REG_SZ C:\Windows
@ww898
ww898 / event-mask.md
Last active January 31, 2024 17:26
.NET Core profiler Event Masks

COR_PRF_MONITOR where:

  • i - COR_PRF_MONITOR_IMMUTABLE (0xEEF8CC00)
  • a - COR_PRF_ALLOWABLE_AFTER_ATTACH (0x100502FE)
  • n - COR_PRF_ALLOWABLE_NOTIFICATION_PROFILER (0xB1E32B7F)
 0 ..n COR_PRF_MONITOR_FUNCTION_UNLOADS
 1 .an COR_PRF_MONITOR_CLASS_LOADS
 2 .an COR_PRF_MONITOR_MODULE_LOADS
 3 .an COR_PRF_MONITOR_ASSEMBLY_LOADS
 4 .an COR_PRF_MONITOR_APPDOMAIN_LOADS
plugin load sos/libsosplugin
setsymbolserver https://resources.jetbrains.com/pdb/
setsymbolserver https://msdl.microsoft.com/download/symbols/
setsymbolserver http://symbols.labs.jb.gg/symbols/
loadsymbols