Skip to content

Instantly share code, notes, and snippets.

View bdeb1337's full-sized avatar
๐ŸŒŠ

Bob D bdeb1337

๐ŸŒŠ
  • Leuven, Belgium
  • 08:01 (UTC +01:00)
View GitHub Profile
@Alistair1231
Alistair1231 / _moonlight-setup.adoc
Last active November 18, 2025 17:04
Headless Moonlight Streaming PC
:doctype: book
:toc: left
:toclevels: 3
:data-uri:
:icons: font
:source-highlighter: rouge
:source-linenums-option: inline
:icons: font
@earthdiver
earthdiver / taskbar.ps1
Last active May 11, 2024 10:15
A code snippet to put a resident PowerShell script into the taskbar notification area
#@Powershell -NoP -W Hidden -C "$PSCP='%~f0';$PSSR='%~dp0'.TrimEnd('\');&([ScriptBlock]::Create((gc '%~f0'|?{$_.ReadCount -gt 1}|Out-String)))" %* & exit/b
# by earthdiver1 V1.05
if ($PSCommandPath) {
$PSCP = $PSCommandPath
$PSSR = $PSScriptRoot
$code = '[DllImport("user32.dll")]public static extern bool ShowWindowAsync(IntPtr hWnd,int nCmdShow);'
$type = Add-Type -MemberDefinition $code -Name Win32ShowWindowAsync -PassThru
[void]$type::ShowWindowAsync((Get-Process -PID $PID).MainWindowHandle,0)
}
Add-Type -AssemblyName System.Windows.Forms, System.Drawing
@heardk
heardk / OneNote-to-MD.md
Last active November 23, 2025 14:52
Convert notes from OneNote into Markdown

Converting One Note to Markdown

This is an example of how to convert notes from OneNote into Markdown to use in other, less annoying Note applications. I am using PowerShell on Windows here, but other shell/scripting environments would work as well. If you want separate .md files, you'll need to export your OneNote pages separately. Exporting a section, or a selection of pages creates a single .docx file.

  • Download and install Pandoc
  • Export each of your note pages to a .docx (Word) format using OneNote export from the File menu
  • Gather all of these .docx files into a directory
  • Open directory in File Explorer
  • Open Powershell from the File Explorer using File -> Open Windows Powersell
  • Run the following command:
@brgnepal
brgnepal / powershell.go
Last active July 30, 2024 17:36
Playing PowerShell command via Golang
package main
import (
"bytes"
"fmt"
"os/exec"
"strings"
)
// PowerShell struct
@crshnbrn66
crshnbrn66 / user-profile.psm1
Last active September 10, 2025 07:14 — forked from MSAdministrator/Create-NewProfile.ps1
PowerShell functions to create a new user profile
<#
.Synopsis
Rough PS functions to create new user profiles
.DESCRIPTION
Call the Create-NewProfile function directly to create a new profile
.EXAMPLE
Create-NewProfile -Username 'testUser1' -Password 'testUser1'
.NOTES
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif)