Skip to content

Instantly share code, notes, and snippets.

View issaclin32's full-sized avatar
💭
Speaks Chinese, Japanese and some Thai.

Issac Lin issaclin32

💭
Speaks Chinese, Japanese and some Thai.
View GitHub Profile
# useage:
# scoop-import <exported_list_file>
param(
$exported
)
$apps = (
Get-Content -Path $exported | Select-String '(?<app>.*)\s\(v:(?<version>.*)\)\s\[(?<bucket>.*)\]' -AllMatches |
Foreach-Object {$_.Matches} |
Foreach-Object {($_.Groups["bucket"].Value)+"/"+($_.Groups["app"].Value)}
@alphp
alphp / NativeMethods.psm1
Created August 27, 2018 04:08
PowerShell module for send WM_SETTINGCHANGE after change Environment variables in Windows
Add-Type -Namespace Win32 -Name NativeMethods -MemberDefinition @"
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam, uint fuFlags, uint uTimeout, out UIntPtr lpdwResult);
"@
function Send-SettingChange {
$HWND_BROADCAST = [IntPtr] 0xffff;
$WM_SETTINGCHANGE = 0x1a;
$result = [UIntPtr]::Zero
@SalviaSage
SalviaSage / Correct Windows Registry Syntax.md
Last active September 7, 2024 16:48
Guide on editing the Windows Registry.

Correct Windows Registry Syntax

Last Revised: 2024-09-07

I made this guide to help anyone interested in editing the Windows Registry.
It is possible to modify the entries of the Windows Registry.
To do this, you need to create a file that ends with the extension .reg.


@akhenakh
akhenakh / guess.go
Last active March 13, 2024 13:18
Guess an image format in Golang
package main
import (
"image"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
"io"
"mime"