Skip to content

Instantly share code, notes, and snippets.

@mnaoumov
mnaoumov / Setup.cmd
Last active April 28, 2018 12:43
Setup environment
powershell -NoExit -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri https://gist.githubusercontent.com/mnaoumov/fe950c42fca4ad2482df2878b3bf9aaa/raw/Setup.ps1 -UseBasicParsing | Invoke-Expression"
@mnaoumov
mnaoumov / 0-ApexSQL Refactor ELSE IF feature request.md
Last active December 9, 2018 09:09
ApexSQL Refactor ELSE IF feature request

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
mnaoumov / build.cmd
Last active October 18, 2019 00:10
Windows case-insensitive file names = nightmares with Node.JS
@node "%~dp0\script.js"
@mnaoumov
mnaoumov / Date.md
Last active December 13, 2022 18:15
Obsidian Templater date creation

<% await tp.user.date(tp) %>

@mnaoumov
mnaoumov / Script.js
Created January 16, 2023 03:40
Obsidian LeetCode replace urls with problem notes
(async () => {
debugger;
const mdFiles = app.vault.getMarkdownFiles().filter(f => f.path.startsWith('Programming/LeetCode/'));
const problemFiles = mdFiles.filter(f => f.path.startsWith('Programming/LeetCode/Problems/'));
const urlNoteMap = new Map();
for (const problemFile of problemFiles) {