Skip to content

Instantly share code, notes, and snippets.

View kyungw00k's full-sized avatar
👋

Kyungwook, Park kyungw00k

👋
View GitHub Profile
@kyungw00k
kyungw00k / Rename.ps1
Created June 22, 2021 08:05 — forked from timnew/Rename.ps1
Script to Rename Computer without Reboot
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName
@Echo Off
For /F "Skip=1 Delims=" %%A In ('WMIC Bios Get SerialNumber'
) Do For /F "Delims=" %%B In ("%%A") Do Call :RenPC %%B
Exit/B
:RenPC
set newName="%~1"
echo Modifying registry keys...
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /d "%newName%" -f
@kyungw00k
kyungw00k / README.md
Last active July 8, 2024 03:52
A utility functions for encoding and decoding `Sec-Browsing-Topics` HTTP header values

SecBrowsingTopicsHeader Utility

This project provides a utility for encoding and decoding Sec-Browsing-Topics HTTP header values. It is based on the Topics API draft specification, which can be found here.

Overview

The SecBrowsingTopicsHeader object offers two primary functions:

  1. decode: Converts a Sec-Browsing-Topics header string into a list of BrowsingTopic objects.