Skip to content

Instantly share code, notes, and snippets.

View exactmike's full-sized avatar

Mike Campbell exactmike

View GitHub Profile
@ajmeese7
ajmeese7 / README.md
Created November 23, 2025 16:12
Camera motion detection to enable Linux monitor (Raspberry Pi)

Presence‑Aware Wall Panel on Raspberry Pi (X11, Bookworm)

This Gist documents a complete, reproducible setup for a Raspberry Pi–driven wall touchscreen that:

  • Turns the monitor off after N minutes of no activity.

  • Turns the monitor on when:

    • The camera detects motion nearby, or
    • The user touches/moves the mouse/keyboard.
  • Re‑applies touchscreen rotation/calibration every time the display wakes.

@AlexanderHolmeset-zz
AlexanderHolmeset-zz / PlannerMigration.ps1
Last active September 3, 2020 17:23
Microsoft Planner Tenant To Tenant Mirgration
### Microsoft Planner Tenant To Tenant Migration Script ###
### ###
### Version 1.0 ###
### ###
### Author: Alexander Holmeset ###
### ###
### Twitter: twitter.com/alexholmeset ###
### ###
### Blog: alexholmeset.blog ###
@SteveL-MSFT
SteveL-MSFT / profile.ps1
Last active May 22, 2026 17:41
PowerShell Prompt
#Requires -Version 7
# Version 1.2.13
# check if newer version
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {
@fedme
fedme / Run Visual Studio Code for Linux from WSL.md
Last active February 12, 2026 10:57
Run Visual Studio Code for Linux from WSL on Windows 10

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
using namespace System.Reflection
function Get-FunctionInfo {
<#
.SYNOPSIS
Get an instance of FunctionInfo.
.DESCRIPTION
FunctionInfo does not present a public constructor. This function calls an internal / private constructor on FunctionInfo to create a description of a function from a script block or file containing one or more functions.
@arebee
arebee / Search-FileIndex.ps1
Last active September 13, 2024 07:17
Use Windows Search from PowerShell
function Search-FileIndex {
<#
.PARAMETER Path
Absoloute or relative path. Has to be in the Search Index for results to be presented.
.PARAMETER Pattern
File name or pattern to search for. Defaults to no values. Aliased to Filter to ergonomically match Get-ChildItem.
.PARAMETER Text
Free text to search for in the files defined by the pattern.
.PARAMETER Recurse
Add the parameter to perform a recursive search. Default is false.
@marchenko1985
marchenko1985 / ConvertTo-Markdown.ps1
Last active July 22, 2024 22:20 — forked from BenNeise/ConvertTo-Markdown.ps1
Converts a PowerShell object to a Markdown table.
<#
.Synopsis
Converts a PowerShell object to a Markdown table.
.EXAMPLE
$data | ConvertTo-Markdown
.EXAMPLE
ConvertTo-Markdown($data)
#>
Function ConvertTo-Markdown {
[CmdletBinding()]