Skip to content

Instantly share code, notes, and snippets.

View regme's full-sized avatar
🤠

Andrey Katamanov regme

🤠
View GitHub Profile
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
-- Join by nullable
SELECT Table1.Col1, Table1.Col2, Table1.Col3, Table2.Col4
FROM Table1 INNER JOIN
Table2
ON (coalesce(Table1.Col1, '') = coalesce(Table2.Col1, '')) AND
(coalesce(Table1.Col2, '') = coalesce(Table2.Col2, ''))
-- RANK OVER PARTITION
select * from (
@regme
regme / Docker connect to remote server.md
Created February 25, 2018 20:23 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
For HTTPS connection use whiledo/docker-remote-api-tls.

@regme
regme / dotnetlayout.md
Created January 19, 2018 08:58 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
// npm install http-proxy --save
var http = require('http'), httpProxy = require('http-proxy');
httpProxy.createProxyServer({target:'http://192.168.11.25:8111'}).listen(8088);
minikube start --vm-driver=hyperv --hyperv-virtual-switch=myswitch --v=3
minikube dashboard
@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" />
@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 / 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 / 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