Skip to content

Instantly share code, notes, and snippets.

View regme's full-sized avatar
🤠

Andrey Katamanov regme

🤠
View GitHub Profile
@regme
regme / install-dotnet-hosting-2.2.6-win.ps1
Created August 14, 2019 18:26
Install .NET Core 2.2 Runtime & Hosting Bundle for Windows (v2.2.6)
Import-Module BitsTransfer
Start-BitsTransfer -source 'https://download.visualstudio.microsoft.com/download/pr/a9bb6d52-5f3f-4f95-90c2-084c499e4e33/eba3019b555bb9327079a0b1142cc5b2/dotnet-hosting-2.2.6-win.exe'
.\dotnet-hosting-2.2.6-win.exe /install /quiet /norestart
Test-NetConnection -ComputerName 10.31.2.11 -Port 1433
docker run --rm -it -v C:\Install\JetBrains:/load python:2.7.15 bash
cd load/
wget https://download.jetbrains.com/go/goland-2019.1.3.exe
@regme
regme / pyodbc-unixODBC-lambda-layer
Created May 2, 2019 12:40 — forked from diriver63/pyodbc-unixODBC-lambda-layer
pyodbc and unixODBC for MSSQL as a lambda layer
# use https://github.com/lambci/docker-lambda to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
# http://www.unixodbc.org/download.html
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt
select ind.NewsHeadlinesIndicatorId, ind.Title, ii.cnt from NewsHeadlinesIndicator ind
join (
select NewsHeadlinesindicatorId, count(*) as cnt from (
SELECT [NewsHeadlinesIndicatorId]
,[FundId]
,[EventDTM]
,[NewsHeadlinesZoneId]
,[Trend]
,[OccurrencesTotal]
,[OccurrencesChecked]
@regme
regme / gist:7e0115a8e13ca90d8a85af96f2d4d367
Last active March 12, 2019 14:40
SQL: Islands and Gaps
drop table #overlappingDateRages
create table #overlappingDateRages(
StartDate date,
EndDate date
)
insert into #overlappingDateRages(StartDate, EndDate)
select '8/24/2017' StartDate , '9/23/2017' EndDate union all
select '8/24/2017' , '9/20/2017' union all
http://www.homedev.com.au/Free/PatchCleaner
@regme
regme / docker-rm-images.md
Created February 28, 2019 21:11 — forked from alferov/docker-rm-images.md
Remove all (untagged) images and containers from Docker
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")

References:

c:\windows\system32\inetsrv\AppCmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json',enabled='True']" /commit:apphost
c:\windows\system32\inetsrv\AppCmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json; charset=utf-8',enabled='True']" /commit:apphost
c:\windows\system32\inetsrv\AppCmd.exe set config -section:system.webServer/httpCompression /+"staticTypes.[mimeType='image/*',enabled='True']" /commit:apphost
diskspd.exe -c1G -b4K -t2 -d10 -a0,1 testfile1.dat testfile2.dat
diskspd.exe -b4k -d30 -o32 -h -L -t8 -W -w50 -P1000 testfile1.dat testfile2.dat