This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Trim and split the clipboard text on newlines, returning only the unique values as an array | |
let values = [...new Set(TextExpander.pasteboardText.trim().split(/\r?\n|\r|\n/g))]; | |
// Determine if there are some values that are not integers | |
if (values.some(x => isNaN(parseInt(x)))) { | |
// Enclose each value in single quotes while escaping any single quotes found in the value itself | |
values = values.map(s => `'${s.replace(/'/g, "''")}'`); | |
} | |
// Return the list as an IN fragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias nplusplus='/c/Program\ Files/Notepad++/notepad++.exe' | |
npp() { | |
nplusplus $* & | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------- | |
// <copyright file="ToSelectList.cs"> | |
// Copyright Justin C. Stolle. All rights reserved. | |
// Licensed under the MIT License. | |
// </copyright> | |
//----------------------------------------------------------------------- | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; |