Skip to content

Instantly share code, notes, and snippets.

View legowerewolf's full-sized avatar

Duncan legowerewolf

View GitHub Profile
@legowerewolf
legowerewolf / readme.md
Last active April 7, 2024 02:13
Tailscale on Steam Deck
@legowerewolf
legowerewolf / statusbar.py
Last active February 19, 2023 16:09
CircuitPython utility coroutines
from asyncio import sleep
import displayio
import terminalio
from adafruit_display_text import label
from wifi import radio
async def maintain_status_bar(canvas: displayio.Group, anchor_point=(0, 0), anchored_position=(0, 0)):
"""
@legowerewolf
legowerewolf / helper.ps1
Last active May 4, 2022 02:48
Grading automation script for CptS 355
#Requires -Version 7.0
<#
Created by Duncan Gibson. This script is shared under the terms of the
CC Attribution-NonCommercial-ShareAlike 4.0 International license, which
may be found here: https://creativecommons.org/licenses/by-nc-sa/4.0/
#>
<#
The PowerShell help system can be invoked to show you how to use this
@legowerewolf
legowerewolf / command.ps1
Last active May 23, 2022 20:17
Delete all local branches where the corresponding remote tracking branch has been deleted
# Requires PowerShell to be installed. Works well when `fetch.prune` is set to `true`.
# running from Bash
pwsh -c 'git branch -vv | where-object {$_ -like "*: gone]*"} | foreach-object {git branch -D ($_ -split "\s+")[1]}'
# running from within pwsh
git branch -vv | where-object {$_ -like "*: gone]*"} | foreach-object {git branch -D ($_ -split "\s+")[1]}
@legowerewolf
legowerewolf / readme.md
Last active November 5, 2022 23:04
Discord Formatting Guide

Discord Formatting Guide

Inline formatting

Code Example
*italics* italics
**bold** bold
__underline__ underline*
~~strikethrough~~ strikethrough
@legowerewolf
legowerewolf / chrome-password-inject.ps1
Last active April 10, 2020 00:06
Inject passwords into Chrome's Password Manager
$arr = [System.Collections.ArrayList]@()
while ($true) {
$url = Read-Host "Service URL (must be valid, leave empty if done)"
if ($url -eq "") {
break
}
$arr.Add([pscustomobject]@{
@legowerewolf
legowerewolf / hyperstart.bat
Last active December 29, 2023 16:45
Selecting a shell on startup in the Hyper terminal emulator
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated