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.
$ python -m SimpleHTTPServer 8000
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Update homebrew recipes | |
echo "Updating homebrew..." | |
brew update |
function Write-AnsiHyperlink { | |
<# | |
.SYNOPSIS | |
Creates an ANSI Hyperlink in a supported terminal such as Windows Terminal 1.4 | |
#> | |
[CmdletBinding()] | |
param( | |
#The Uri that you wish to have as part of the hyperlink | |
[Parameter(Mandatory,ValueFromPipeline)][UriBuilder]$Uri, | |
#The label text that will actually be shown in Windows Terminal |
<# | |
.SYNOPSIS | |
Bootstraps the Powershell Universal Dashboard with per-folder configurations on a random port | |
.DESCRIPTION | |
Saves a copy of Universal Dashboard to the LocalAppData/UniversalDashboard folder and starts it for the current folder. | |
This is useful for rapid testing, or integrating into scripts for easy deployment | |
.EXAMPLE | |
Start-UD -DashboardVersion 1.2.9 | |
Bootstraps version 1.2.9 of the dashboard specifically | |
.EXAMPLE |
function prompt { | |
$Success = $? | |
$ConsoleWidth = ($host.UI.RawUI.WindowSize.Width, $Host.UI.RawUI.BufferSize.Width -gt 0)[0] | |
$Escape = "`e[" | |
$EndEscape = "m" | |
$Slash = [IO.Path]::DirectorySeparatorChar | |
$Path = $ExecutionContext.SessionState.Path.CurrentLocation | |
$CurrentFolder = Split-Path -Path $Path -Leaf | |
$Host.UI.RawUI.WindowTitle = "PS $Path" |
# mute here: https://twitter.com/settings/muted_keywords | |
republicans | |
democrats | |
sanders | |
manafort | |
comey | |
koch | |
kkk | |
ku klux klan | |
TERF |
#!/bin/sh | |
####################################################### | |
# | |
# Edits the proxmox Subscription file to make it | |
# think that it has a Subscription. | |
# | |
# Will disable the annoying login message about | |
# missing subscription. | |
# |
-- Based on code here: http://www.sqlservercentral.com/articles/Fuzzy+Match/65702/ | |
-- Modified to be used in SQL Server Database Projects or run on its own, and fixed similarity vs distance confusion | |
CREATE FUNCTION [dbo].JaroWinklerGetCommonCharacters(@firstWord VARCHAR(MAX), @secondWord VARCHAR(MAX), @matchWindow INT) | |
RETURNS VARCHAR(MAX) AS | |
BEGIN | |
DECLARE @CommonChars VARCHAR(MAX) | |
DECLARE @copy VARCHAR(MAX) | |
DECLARE @char CHAR(1) | |
DECLARE @foundIT BIT |
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.
$ python -m SimpleHTTPServer 8000