Skip to content

Instantly share code, notes, and snippets.

View johndonnelly's full-sized avatar

John Donnelly johndonnelly

View GitHub Profile
@steviecoaster
steviecoaster / New-PackageConfig.ps1
Last active July 22, 2021 02:45
Backup Chocolatey Packages To File
<#
.SYNOPSIS
Creates a packages.config file from installed choco packages
.PARAMETER SourceFriendlyName
The friendly name of an available choco source on the system. This will explicity set the source in the config file
such that installation on the new system will come from this source.
.PARAMETER OutputFile
The config file to save output too. Must end in '.config'.
See youtube below for easy install instruction (just copy and paste oneliner in Powershell) and demo tour of Text-to-speech with Cortana:
https://www.youtube.com/watch?v=u3rIyxtpEFY
@jakobii
jakobii / HTTPServer.ps1
Last active May 4, 2024 14:02
A Basic Powershell Webserver
# You Should be able to Copy and Paste this into a powershell terminal and it should just work.
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
@omidkrad
omidkrad / ExecJavaScript.ps1
Last active April 10, 2023 18:12
PowerShell function to run JavaScript/JQuery and return results back to PS, with timeout
# PowerShell function to run JavaScript/JQuery and return results back to PS, with timeout
# some web page with jQuery in it
$url = "http://jquery.com/"
Function ResetTimer
{
$script:startTime = [DateTime]::Now
}