Skip to content

Instantly share code, notes, and snippets.

View MarioBinder's full-sized avatar

Mario Binder MarioBinder

View GitHub Profile
MarioBinder / CronTab-Expander.sql
Created August 29, 2023 09:54 — forked from LSTANCZYK/CronTab-Expander.sql
Expand CronTab expressions with SQL / T-SQL
View CronTab-Expander.sql
USE Exercises
/* ***********************************************************************************************
* ***********************************************************************************************/
MarioBinder / levenshtein.ts
Created August 8, 2022 06:01
View levenshtein.ts
export function levenshtein(a: string, b: string): number {
if (!a.length) {
return b.length;
/* c8 ignore next 3 */
if (!b.length) {
return a.length;
MarioBinder / compareFolders.ps1
Created June 9, 2022 14:38
compare to folders (with manipulatings foldernames)
View compareFolders.ps1
$Folder1 = Get-ChildItem -Name "D:\Gitserver\Repositories" | foreach {$_.ToLower() + ".git"}
$Folder2 = Get-childitem -Name "D:\Gitea\Repositories\wdmm" | foreach {$_.ToLower() }
Compare-Object $Folder1 $Folder2
MarioBinder /
Last active March 14, 2022 17:18
open sublime links from webpage


Setting up Custom URI scheme handler for Windows to open files in Sublime editor
Created to parse URI's generated by filp/whoops
Parsing is done with VBScript, as that was the only way I found to open Sublime editor, while avoiding annoying command prompt window to pop up and close.


After downloading / cloning the repository, you have to edit files to update path to open_file.vbs and to add path to Sublime editor
Currently I don't have time to create install/uninstall scripts, so any help is welcome
Also, is all upside-down, so that will be updated soon

MarioBinder / enableOleAutomation.sql
Last active February 24, 2022 12:14 — forked from JahsonKim/enableOleAutomation.sql
How to send http POST request from sql server stored procesdure.
View enableOleAutomation.sql
--This query enables ole automation procedures. set 0 to disable
exec master.dbo.sp_configure 'Ole Automation Procedures', 1
--OLE automation disabled the following error is thrown.
--SQL Server blocked access to procedure 'sys.sp_OACreate' of component
--'Ole Automation Procedures' because this component is turned off as part
--of the security configuration for this server.
--A system administrator can enable the use of 'Ole Automation Procedures'
MarioBinder / tools.bat
Created November 19, 2021 15:11
faster delete folder in windows
View tools.bat
rmdir /s/q foldername
MarioBinder / tools.bat
Last active January 3, 2022 13:17
command line -> cd unc / network folders
View tools.bat
create a temp virtual drive: pushd "\\\"
delete the virtual drive: popd "\\\"
MarioBinder / jquery.js
Created October 29, 2021 12:44
load jquery in console
View jquery.js
var jq = document.createElement('script');
jq.src = "";
// ... give time for script to load, then type (or see below for non wait option)
MarioBinder / script.sql
Created October 29, 2021 09:32
SQL measure IO and time for query
View script.sql
MarioBinder / Program.cs
Created October 29, 2021 08:59
PriorityQueue Example
View Program.cs
var tvShows = new PriorityQueue<string, ShowRating>();
tvShows.Enqueue("Modern Family", ShowRating.Good);
tvShows.Enqueue("Ted Lasso", ShowRating.Amazing);
tvShows.Enqueue("MasterChef", ShowRating.Good);
tvShows.Enqueue("Breaking Bad", ShowRating.Transcendant);
tvShows.Enqueue("Happy Endings", ShowRating.Amazing);
tvShows.Enqueue("Game of Thrones (Seasons 1-6)", ShowRating.Amazing);
tvShows.Enqueue("Game of Thrones (Seasons 7-8)", ShowRating.OK);
tvShows.Enqueue("How to Get Away with Murder", ShowRating.Good);