Skip to content

Instantly share code, notes, and snippets.

View Daenero's full-sized avatar

Mykhailo Soroka Daenero

  • Kharkiv, Ukraine
View GitHub Profile
@Daenero
Daenero / setup.sh
Last active July 9, 2022 14:51
Update
#!/bin/bash -e
echo "=================================================================="
echo "= Updated file with removed 'command' in authorized_keys for root"
echo "=================================================================="
# github.com/jawj/IKEv2-setup
# Copyright (c) 2015 – 2021 George MacKerron
# Released under the MIT licence: http://opensource.org/licenses/mit-license
@Daenero
Daenero / list_usage.sql
Last active August 26, 2021 10:45
Get list of dependencies in Stored Procedure
-- Generate temporary table to hold procedure call tree
IF OBJECT_ID('tempdb..#procdeps') IS NOT NULL DROP TABLE #procdeps
CREATE TABLE #procdeps (id_child INT, name_child NVARCHAR(128), id_parent INT, name_parent NVARCHAR(128), level INT, hierarchy VARCHAR(900))
ALTER TABLE #procdeps ADD CONSTRAINT uk_child_parent UNIQUE (id_child, id_parent)
CREATE INDEX idx_hierarchy ON #procdeps (hierarchy)
GO
BEGIN
DECLARE @proccnt INT
DECLARE @prevcnt INT
@Daenero
Daenero / quill-fix-indent.ts
Created November 13, 2020 14:29
Fix for Quill.js issue with list indent (use of css class instead of pure HTML)
// https://github.com/quilljs/quill/issues/979
interface NestedElement {
content: string;
indent: number;
classes: string;
}
export function quillDecodeIndent(text: string) {
if (!text || text.length === 0) {