Skip to content

Instantly share code, notes, and snippets.

View sschwartzman's full-sized avatar
💾
strongbad, underscore, email, dot e-x-e. Enter.

Seth Schwartzman sschwartzman

💾
strongbad, underscore, email, dot e-x-e. Enter.
  • https://en.wikipedia.org/wiki/Charm_city
View GitHub Profile
@sschwartzman
sschwartzman / vBookmarks-macOSSystemFont.css
Created October 21, 2021 13:53
MacOS system font CSS for vBookmarks Chrome extension
* {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: small}
}
@sschwartzman
sschwartzman / NR-Synthetics-Get-Latest-NR-Browser-Version.js
Last active October 13, 2021 15:59
New Relic Synthetics script to retrieve the latest version of New Relic Browser and its release dates
/**
* Script Name: {Browser - Check current release}
*
* Generated using New Relic Synthetics Formatter for Katalon
*
* Feel free to explore, or check out the full documentation
* https://docs.newrelic.com/docs/synthetics/new-relic-synthetics/scripting-monitors/writing-scripted-browsers
* for details.
*/
@sschwartzman
sschwartzman / GSheets-Multi-Select-Drop-Down.gs
Last active June 27, 2023 15:37
Create a Multi-Select Drop-Down for any cell in Google Sheets
const separator = ', ';
const dvType = SpreadsheetApp.DataValidationCriteria.VALUE_IN_RANGE;
function onEdit(e) {
if (e.value != null && e.oldValue != null && e.value !== "") {
var dataValidation = e.range.getDataValidation();
if(dataValidation != null && dataValidation.getCriteriaType() == dvType &&
e.value.indexOf(separator) < 0 && e.oldValue.indexOf(e.value) < 0) {
e.range.setValue(e.oldValue + separator + e.value);
}
@sschwartzman
sschwartzman / Google-Sheets-To-New-Relic-Insights.gs
Created March 4, 2021 22:19
Takes the contents of a Google Sheet and turns them into New Relic Insights Events
// Google Sheets to New Relic Insights
// Google Apps Script that takes the contents of a Google Sheet (or any two-dimensional array)
// and sends each row to New Relic as an Insights Event.
// Configurable settings
const InsightsInsertKey = 'your_insights_insert_api_key';
const RpmAccountId = 'your_RPM_account_ID';
const CSVDelimiter = ',';
const DateFormats = ["M/D/YYYY", "M/D/YYYY h:mm:ss A"];
@sschwartzman
sschwartzman / numberize.sh
Created November 17, 2020 17:46
Numberizer - Turns words into numeronyms
#!/bin/bash
wordinput=$1
wordnumber=$(expr ${#wordinput} - 2)
echo "${wordinput:0:1}${wordnumber}${wordinput: -1}"