Skip to content

Instantly share code, notes, and snippets.

View regme's full-sized avatar
🤠

Andrey Katamanov regme

🤠
View GitHub Profile
$Url = 'https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe'
$Exe = "net461.exe"
$Dest = "C:\\" + $Exe
$Params = " /q"
$client = new-object System.Net.WebClient
$client.DownloadFile($Url,$Dest)
Invoke-Expression ("cmd.exe /C " + $Dest + $Params)
@regme
regme / InstallDotNet462.ps1
Created March 6, 2017 12:00
InstallDotNet462.ps1
$Url = 'https://download.microsoft.com/download/F/9/4/F942F07D-F26F-4F30-B4E3-EBD54FABA377/NDP462-KB3151800-x86-x64-AllOS-ENU.exe'
$Exe = "net462.exe"
$Dest = "C:\\" + $Exe
$Params = " /q"
$client = new-object System.Net.WebClient
$client.DownloadFile($Url,$Dest)
Invoke-Expression ("cmd.exe /C " + $Dest + $Params)
@regme
regme / RemoveDefaultWebSite.ps1
Created March 29, 2017 19:49
remove default web site
# source http://blog.kmsigma.com/2016/02/25/removing-default-web-site-application-pool/
# Check for Admin Access (UAC)
$User = [Security.Principal.WindowsIdentity]::GetCurrent()
$Role = ( New-Object Security.Principal.WindowsPrincipal $user ).IsInRole( [Security.Principal.WindowsBuiltinRole]::Administrator )
if ( -not $Role )
{
Write-Warning "To perform some operations you must run an elevated Windows PowerShell console."
}
else
{
@regme
regme / AlterUser.sql
Created May 8, 2017 15:24
ALTER USER
ALTER USER [UserName] WITH LOGIN = [UserLogin];
@regme
regme / protocol_check.sql
Created June 14, 2017 16:11
Verifying Your Connection Protocol
SELECT net_transport
FROM sys.dm_exec_connections
WHERE session_id = @@SPID
@regme
regme / release_notes.cmd
Created June 15, 2017 20:58
Release notes
git log --pretty="format: - %s%b **%an**@_%h_" --abbrev-commit master..release/rc-49 --no-merges > release.txt
@regme
regme / JobLog_info.sql
Last active August 29, 2017 13:14
JobLog info
select *, Name + ' is running for ' + CONVERT(varchar(10),DATEDIFF(minute,startdate, getutcdate()), 114) + ' minutes on [Advisory_Fact_Test]' from [Advisory_Fact_Test].dbo.JobLog
where stopDate is null and startdate > getutcdate() - 7
union all
select *, Name + ' is running for ' + CONVERT(varchar(10),DATEDIFF(minute,startdate, getutcdate()), 114) + ' minutes on [AdvisoryFact]' from [AdvisoryFact].dbo.JobLog
where stopDate is null and startdate > getutcdate() - 7
@regme
regme / gist:fa517ec654ce250f008de09e7aeb7e79
Last active January 30, 2019 21:43
dotnet update package reference
<PackageReference Include="(.+?), Version=(.+?),.+
<HintPath>..\\Advisory_Algorithm\\packages\\(.+?)\.([\d\.]+)\\.+$ --> <PackageReference Include="$1" Version="$2" />
minikube start --vm-driver=hyperv --hyperv-virtual-switch=myswitch --v=3
minikube dashboard
// npm install http-proxy --save
var http = require('http'), httpProxy = require('http-proxy');
httpProxy.createProxyServer({target:'http://192.168.11.25:8111'}).listen(8088);