Skip to content

Instantly share code, notes, and snippets.

View reZach's full-sized avatar
💭
I may be slow to respond.

reZach reZach

💭
I may be slow to respond.
View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 8, 2024 18:19
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jmosbech
jmosbech / Exec-Sproc.ps1
Created May 26, 2013 19:40
Executes a Stored Procedure from Powershell and returns the first output DataTable
# Executes a Stored Procedure from Powershell and returns the first output DataTable
function Exec-Sproc{
param($Conn, $Sproc, $Parameters=@{})
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand
$SqlCmd.CommandType = [System.Data.CommandType]::StoredProcedure
$SqlCmd.Connection = $Conn
$SqlCmd.CommandText = $Sproc
foreach($p in $Parameters.Keys){
[Void] $SqlCmd.Parameters.AddWithValue("@$p",$Parameters[$p])