Skip to content

Instantly share code, notes, and snippets.

View amnweb's full-sized avatar
🏠
Working from home

amnweb

🏠
Working from home
View GitHub Profile
@amnweb
amnweb / ollama-ai-powershell.ps1
Last active January 4, 2024 16:10
ollama ai powershell
function ChatInit {
param(
[Parameter(Mandatory = $true)][string]$Model
)
Write-Host "AI Chat Started`nModel: $Model" -ForegroundColor Blue
wsl -e ollama run $Model
}
function CreateMenu {
param(
@amnweb
amnweb / post WU installation cleanup script windows 11.bat
Created November 10, 2023 19:34
post WU installation cleanup script windows 11
:: Elevation script from StackOverflow
:: https://stackoverflow.com/a/28467343
:: Begin Elevation script
@ECHO OFF
setlocal EnableDelayedExpansion
::net file to test privileges, 1>NUL redirects output, 2>NUL redirects errors
@amnweb
amnweb / starship.toml
Created October 20, 2023 21:22
starship.toml
format = """
[](#3B4252)\
$username\
[](bg:#434C5E fg:#3B4252)\
$directory\
[](fg:#434C5E bg:#4C566A)\
$git_branch\
$git_status\
[](fg:#4C566A bg:#86BBD8)\
$c\
@amnweb
amnweb / Clear_Event_Viewer_Logs.bat
Created September 24, 2023 17:32
Clear Event Viewer Logs Windows 10/11
@echo off
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
IF (%adminTest%)==(Access) goto noAdmin
for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
echo.
echo All Event Logs have been cleared.
goto theEnd
:do_clear
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#45F1C2",
"style": "plain",
"template": "{{if .Root}}root{{else}}{{ .UserName }}{{end}}",