Skip to content

Instantly share code, notes, and snippets.

mnaoumov / build.cmd
Last active Oct 18, 2019
Windows case-insensitive file names = nightmares with Node.JS
View build.cmd
@node "%~dp0\script.js"
mnaoumov / 0-ApexSQL Refactor ELSE IF feature
Last active Dec 9, 2018
ApexSQL Refactor ELSE IF feature request
View 0-ApexSQL Refactor ELSE IF feature

ApexSQL Refactor has setting Always use BEGIN and END in IF statements

It doesn't work well for ELSE IF statements and includes unnecessary nesting

Even worse, it includes semicolons after END on subsequent formatting which makes SQL invalid

mnaoumov / Setup.cmd
Last active Apr 28, 2018
Setup environment
View Setup.cmd
powershell -NoExit -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri -UseBasicParsing | Invoke-Expression"
View ViewState.ps1
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
function Replace-ViewState([string] $content)
if (-not ($content.Contains("ViewState[")))
return $content
View MicrosoftAjaxWebForms.Debug.js
// Name: MicrosoftAjaxWebForms.debug.js
// Assembly: System.Web.Extensions
// Version:
// FileVersion: 4.0.30319.36278
// Copyright (C) Microsoft Corporation. All rights reserved.
// MicrosoftAjaxWebForms.js
// Microsoft AJAX ASP.NET WebForms Framework.
Type._registerScript("MicrosoftAjaxWebForms.js", [
View main.html
<!doctype html>
var iframe = document.createElement("iframe");
iframe.src = "";
setTimeout(function removeIframe() {
View FunctionRegex.cs
string testString = @"
FUNCTION ""Timer_€_OC"" : Void
var functionRegex = new Regex(@"FUNCTION\s*\""(?<Name>[^\""]+)\""\s*\:\s*(?<Type>[\S]+)");
var match = functionRegex.Match(testString);
Debug.Assert(match.Groups["Name"].Value == "Timer_€_OC");
View git-trace-https.txt
C:\dev\1> $env:GIT_TRACE=1
C:\dev\1> $env:GIT_CURL_VERBOSE=1
C:\dev\1> git clone -v
trace: built-in: git 'clone' '-v' ''
Cloning into 'gitextensions'...
trace: run_command: 'git-remote-https' 'origin' ''
* Couldn't find host in the _netrc file; using defaults
* Adding handle: conn: 0x2150398
* Adding handle: send: 0
* Adding handle: recv: 0
View gist:a1e81f3ed3ee03a63a60
C:\dev> $env:GIT_TRACE=1
C:\dev> $env:GIT_CURL_VERBOSE=1
C:\dev> git clone -v
trace: built-in: git 'clone' '-v' ''
Cloning into 'gitextensions'...
trace: run_command: 'ssh' '' 'git-upload-pack '\''gitextensions/gitextensions.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 155040 on OTPDEV'
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 155040 on OTPDEV'
remote: Reusing existing pack: 52618, done.
remote: Counting objects: 69, done.
mnaoumov / gist:4575495
Last active Dec 11, 2015
git log strange behavior
View gist:4575495
git log --oneline --decorate master..1.0
ec9988c (tag: build-1.3.2616.0, 1.0) Merge branch '1.0' into mobile
e29326d Merge remote-tracking branch 'origin/1.0' into 1.0
b716f00 Merge branch '1.0' into mobile
faa9bc3 TFS9437 send down correct brand id
25ae928 Fix js hint errors
aef6132 Merge branch 'mobile' of into mobile
1d9691a TFS9112 Fix Bug in Mobile:Customer details- Navigation is not working on Time zone page.
50e31c3 Merge branch 'mobile' of into mobile