Skip to content

Instantly share code, notes, and snippets.

View eljenso's full-sized avatar

Jens Böttcher eljenso

  • Dortmund, Germany
View GitHub Profile
@EverythingSmartHome
EverythingSmartHome / flexispot-e7pro-voice.yaml
Created November 13, 2024 18:32
flexispot-e7pro-voice-assistant
esphome:
friendly_name: flexispot-e7q
name: flexispot-e7q
platformio_options:
board_build.flash_mode: dio
on_boot:
- priority: -10
then:
- button.press: button_m
- priority: 600
@simov
simov / README.md
Last active April 4, 2025 21:39
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@nolanlawson
nolanlawson / protips.js
Last active November 19, 2024 02:40
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");