Skip to content

Instantly share code, notes, and snippets.

@rmeekers
rmeekers / node_red.json
Last active February 5, 2024 11:14
Node Red flow to monitor Eeve / Toadi to Home Assistant via MQTT (including auto discovery) - https://community.home-assistant.io/t/eeve-toadi-willow/405097
[
{
"id": "76106b40e1ce3c2f",
"type": "tab",
"label": "Toadi to MQTT",
"disabled": false,
"info": "",
"env": []
},
{
@rmeekers
rmeekers / paletteSet.json
Last active July 26, 2023 12:49
Enter Digital Color Palette
{
"author": "Enter Digital – www.enterdigital.coop",
"description": "The official brand colours of Enter Digital.",
"palette": [
{
"name": "Base Brand Colours",
"description": "",
"colors": [
"#E0F378",
"#F5F5F5",
@rmeekers
rmeekers / code.gs
Created December 11, 2017 08:46
Bulk Convert XLSX Files in Google Drive To Google Sheet
/*
* Setttings
*/
// Google Drive Folder ID which contains the Excel files you want to convert
var driveFolderId = '';
// Folder name in which we should place the original files after conversion
var sourceFilesFolderName = 'Source Files';
@rmeekers
rmeekers / osx_install.sh
Last active November 23, 2021 12:19
Mac Install most of my Apps with homebrew & cask after a clean install
#!/bin/bash
#run this first: chmod +x osx_install.sh
####
echo Install AppStore Apps first as we cannot do this automatically!
read -p "Press any key to continue... " -n1 -s
echo '\n'
####
echo Install Homebrew, wget cask and a few other apps
^(\w[\s\w\-\'.]+?)\s?((?:\d+(?:\s?-\s?\d+)?)\s?[a-zA-Z]?)(?:\s?-?\s?)?((?:\/|bus|Bus)\s?.+)?$
@rmeekers
rmeekers / vlookup_in_multiple_columns.md
Last active April 24, 2020 07:13
Google Sheet formula to do a vlookup in multiple columns

Assumptions:

  • value to look for is in cell C2
  • array to search in: 'email domains'!A:Y
  • value to retrieve is in column no 26 (Z)
=ArrayFormula(if(countif('email domains'!A:Y;C2)=0;"";index('email domains'!A:Z;sum(if('email domains'!A:Y=C2;row('email domains'!A:Y))); sum(if('email domains'!A:Y=C2;26)))))
@rmeekers
rmeekers / difference between straight and curly quotes.md
Created March 13, 2020 11:13
What's the difference between straight and curly quotes?

Straight quotes are the generic vertical quotation marks which are inserted via the quotes button on a keyboard. There are two variants:

  1. the straight single quote (') and 2 .the straight double quote (").

Curly quotes are the quotation marks used in good typography. There are two sets of curly quote characters:

  1. Single quotes: the opening single quote (‘) and the closing single quote (’)
  2. Double quotes: the opening double quote (“) and the closing double quote (”).

How to use these quotes in a text editor?

This describes how you can convert an XML file to a simple HTML table. The table can then be copy/pasted into a Google Sheet for example for further manipulation.

Install Saxon

brew install saxon

Convert XML file to HTML

saxon -s:input.xml -xsl:stylesheet.xsl -o:result.html

Sample XSL

/**
* Set of functions to import CSV files into a Google Sheet
* Imports CSV as text, freezes the first row, sets it bold and removes empty rows and columns.
*/
var settings = {
CSVFolderID: '',
singleFileID: '',
CSVSeparator: ';'
}
<tag>[\s\S]*?</tag>