Skip to content

Instantly share code, notes, and snippets.

@JustinGrote
JustinGrote / PutInYourProfile.ps1
Last active November 10, 2021 08:50
Press F1 to view the currently typed command help online
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
#requires -version 5
# Stolen and modified from https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
# F1 for help on the command line - naturally
Set-PSReadLineKeyHandler -Key F1 `
-BriefDescription CommandHelp `
-LongDescription 'Open the help window for the current command' `
-ScriptBlock {
@jackm
jackm / can-packages-and-tools.md
Last active April 23, 2024 03:39
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.

@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
{"lastUpload":"2021-05-04T23:41:33.619Z","extensionVersion":"v3.4.3"}