Skip to content

Instantly share code, notes, and snippets.

@DevResearchAccount
DevResearchAccount / Install-LatestWinGet.ps1
Created September 13, 2025 14:01 — forked from stknohg/Install-LatestWinGet.ps1
Windows Server 2022にWindows Terminal, WinGetをインストールする関数
function Install-LatestWinGet ([switch]$SkipInstallVCLibs) {
# Install prerequisites
if (-not $SkipInstallVCLibs) {
$vcLibsUrl = 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
Write-Host -ForegroundColor Green "Download $vcLibsUrl"
Add-AppxPackage -Path $vcLibsUrl
}
# Find the latest assets url
$latest = Invoke-RestMethod -Uri 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
@DevResearchAccount
DevResearchAccount / README.md
Created August 18, 2025 15:13 — forked from P1N2O/README.md
Guide to Compile an Android Kernel with Clang

Android Kernel Compilation Guide

This gist is intended to assist beginners, like myself, in getting started with Android Kernel Compilation. Please note that while I'm sharing my setup and process, this guide may not be entirely accurate, and I welcome suggestions from experienced developers to improve it.

Installing Build Tools

I am on Arch, so I will be using pacman to install the base-devel package group.

sudo pacman -S base-devel

On a Debian based distro, you can use apt and install the build-essential package.

@DevResearchAccount
DevResearchAccount / Office 2024 ISO Links at Microsoft.md
Created August 18, 2025 15:09 — forked from dori4n/Office 2024 ISO Links at Microsoft.md
Office 2024 ISO Download Links at Microsoft

Install GitLab CE with SSL, GitLab Pages, and Local DNS (Bind9)

This guide explains how to install GitLab Community Edition (omnibus) on Ubuntu, serve it over HTTPS, enable GitLab Pages (with wildcard DNS), and run a local Bind9 DNS authority for mylocal.home.

It creates a local DNS zone mylocal.home with a wildcard *.pages.mylocal.home, a local CA + SAN certificate, and configures GitLab omnibus.


Assumptions / variables

Microsoft Defender for Endpoint does a great job of ensuring the integrity of the scripts they push and execute.

First, they ensure that the script to execute matches the expected file hash. Example:

powershell.exe -ExecutionPolicy AllSigned -NoProfile -NonInteractive -Command "& {$OutputEncoding = [Console]::OutputEncoding =[System.Text.Encoding]::UTF8;$scriptFileStream = [System.IO.File]::Open('C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollection\7910.6064030.0.6552433-3a7d9fb541a03fc183f740777b7bb1aa20a20efd\046a3caf-d9ec-4da6-a32a-fb148992596a.ps1', [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileAccess]::Read);$calculatedHash = Get-FileHash 'C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\DataCollection\7910.6064030.0.6552433-3a7d9fb541a03fc183f740777b7bb1aa20a20efd\046a3caf-d9ec-4da6-a32a-fb148992596a.ps1' -Algorithm SHA256;if (!($calculatedHash.Hash -eq 'd871ab44a81b93cdf3c7e235c246ea8b4bf65d9141d7797270c15dd6bbdb2803'))
@DevResearchAccount
DevResearchAccount / ParallelTaskRunner.psm1
Created April 16, 2025 09:57 — forked from jeremybeavon/ParallelTaskRunner.psm1
Powershell parallel task runner using msbuild
function Invoke-ParallelPowershellFiles
{
[CmdletBinding()]
param(
[hashtable]$PowershellFiles,
[int]$NumberOfFilesToRunInParallel,
[string]$LogDirectory = ((Get-Location).Path)
)
if (!$NumberOfFilesToRunInParallel)
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
How to define a variable.
Just stick a new node in a property group.
-->
<PropertyGroup>
<!-- This node in a property group will define a variable -->
<TestVariable>Test Variable Value</TestVariable>
@DevResearchAccount
DevResearchAccount / overlapped_named_pipe.cpp
Created February 18, 2025 15:29 — forked from mmozeiko/overlapped_named_pipe.cpp
Example how to use read-only named pipes with single client in non-blocking way on single thread
#include <windows.h>
#include <stdio.h>
#include <assert.h> // for potential error handling, change to real errors in your code
int main()
{
HANDLE pipe = CreateNamedPipeW(
L"\\\\.\\pipe\\lolcat",
PIPE_ACCESS_INBOUND | FILE_FLAG_FIRST_PIPE_INSTANCE | FILE_FLAG_OVERLAPPED,
PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS,