Skip to content

Instantly share code, notes, and snippets.

View hihigash's full-sized avatar

Hirokazu Higashino hihigash

View GitHub Profile
@hihigash
hihigash / test.html
Created January 11, 2024 13:54
Hello World Html
<html>
<head>
<style>
h1 {
font-family: Calibri;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
@hihigash
hihigash / test.md
Created January 11, 2024 13:54
Hello World Markdown

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}
Param([string]$fileName)
# https://learn.microsoft.com/ja-jp/azure/devops/organizations/settings/work/import-process/customize-process?view=azure-devops#global-lists
$xml = [xml](Get-Content $fileName)
$globallistNodes = $xml.SelectNodes("//GLOBALLIST");
$listCount = $globallistNodes.Count
Write-Host "The total GLOBALLIST count is $($listCount) - " -NoNewline
if ($listCount -ge 64) { Write-Host "Invalid (over 64)" -ForegroundColor Red } else { Write-Host "Valid" -ForegroundColor Green }
$number = 1;
@hihigash
hihigash / Office.ahk
Created May 13, 2020 07:55
RWin to Office (M365) Key
RWin::
Send, {LCtrl Down}{LShift Down}{LAlt Down}{LWin Down}
Return
RWin Up::
Send, {LCtrl Up}{LShift Up}{LAlt Up}{LWin Up}
Return
$code = @'
[DllImport("user32.dll")]
public static extern IntPtr GetWindowThreadProcessId(IntPtr hWnd, out int ProcessId);
'@
Add-Type $code -Name Utils -Namespace Win32
Function GetProcessIdByHWND($whnd) {
[IntPtr]$result = [IntPtr]::Zero
[Win32.Utils]::GetWindowThreadProcessId([Int32]$whnd, [ref]$result)
@hihigash
hihigash / microsoft-protocols.json
Created November 23, 2019 05:52
Microsoft Protocols Version History
This file has been truncated, but you can view the full file.
[
{
"Id": "MC-BUP",
"Name": "Background Intelligent Transfer Service (BITS) Upload Protocol",
"Url": "https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-bup/2c2fe5e1-f105-4264-b80b-1f31e9e5dc6b",
"Description": "Specifies the Background Intelligent Transfer Service (BITS) Upload Protocol, which is used to upload large entities from a client to a server over networks with frequent disconnections, and to send notifications from the server to a server application about the availability of the uploaded entities.",
"Versions": [
{ "Date": "9/12/2018", "Revision": "13.0", "Class": "Major" },
{ "Date": "9/15/2017", "Revision": "12.0", "Class": "Major" },
{ "Date": "6/1/2017", "Revision": "11.0", "Class": "None" },
@hihigash
hihigash / UpdateSysinternalsSuite.ps1
Created July 13, 2018 05:09
Update SysinternalsSuite
$downloadFileName = Join-Path $env:USERPROFILE "Downloads\sysinternalsSuite.zip"
Invoke-WebRequest -Uri "https://download.sysinternals.com/files/SysinternalsSuite.zip" -OutFile $downloadFileName
Expand-Archive -Path $downloadFileName -DestinationPath "C:\Tools\SysinternalsSuite" -Force
Remove-Item -Path $downloadFileName
Write-Host "Sysinternals suite has been updated to the latest version!"
@hihigash
hihigash / convert_md2pptx.yaml
Last active July 10, 2018 06:45
Convert PowerPoint files from Markdown files for VSTS CI/CD
resources:
- repo: self
queue:
name: Hosted Linux Preview
steps:
- bash: |
docker pull hihigash/pandoc:latest
docker run --rm -v $(Build.SourcesDirectory):/workspace hihigash/pandoc
displayName: Bash Script
@hihigash
hihigash / Hide_OpenInVisualStudio.bat
Created May 29, 2018 02:30
Hide "Open in Visual Studio" from shell context menu
@ECHO OFF
SETLOCAL
SET BACKGROUNDSHELL=HKCR\Directory\Background\shell\AnyCode
REG QUERY %BACKGROUNDSHELL%
IF %ERRORLEVEL% == 0 CALL :ADD_EXTENDED %BACKGROUNDSHELL%
SET SHELL=HKCR\Directory\shell\AnyCode
REG QUERY %SHELL%
IF %ERRORLEVEL% == 0 CALL :ADD_EXTENDED %SHELL%
@hihigash
hihigash / Program.cs
Created May 27, 2016 23:39
WMI MSNdis_StatusMediaConnect and MSNdis_StatusMediaDisconnect Sample Code
// ===========================================================================
// WMI MSNdis_StatusMediaConnect/MSNdis_StatusMediaDisconnect Sample Code
// ---------------------------------------------------------------------------
// This Sample Code is provided for the purpose of illustration only and is
// not intended to be used in a production environment. THIS SAMPLE CODE AND
// ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We
// grant You a nonexclusive, royalty-free right to use and modify the Sample
// Code and to reproduce and distribute the object code form of the Sample