Skip to content

Instantly share code, notes, and snippets.

@eugenk
eugenk / prompt-config-powerlevel9k.plugin.zsh
Last active May 10, 2024 10:43
ZSH prompt: Powerlevel9k config
# nerd-font patched (complete) font required! See
# https://github.com/ryanoasis/nerd-fonts
# Set the right locale to protect special characters
POWERLEVEL9K_MODE='nerdfont-complete'
POWERLEVEL9K_VCS_GIT_ICON='\uF1D3'
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B8'
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B6'
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1'
@eugenk
eugenk / heating-control.yaml
Last active January 12, 2022 21:14 — forked from r3mcos3/heating.yaml
Home Assistant Blueprint For Heating
blueprint:
name: Heating Control using Time of Day
description: Controls the heating by presence and time of day
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
entity:
@eugenk
eugenk / wake-up-light-alarm-with-sunrise-effect.yaml
Last active March 9, 2022 16:41 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@eugenk
eugenk / gitmoji-pager-create
Last active May 23, 2024 05:39
Create Gitmoji Pager for Git CLI
#!/usr/bin/env node
/**
* This script gives you a git pager that translates gitmoji to emoji in your
* terminal. This displays actual emojis in the terminal, so only use this with
* a terminal application that supports it (e.g. iterm2).
*
* Make this file executable. Adjust the `targetFile` in the first JS-line.
* When you execute this file, it will populate the `targetFile` with a pager
* script.
@eugenk
eugenk / Readme.md
Last active July 1, 2024 10:20
Marrying ESM with NestJS and Jest

Marrying ESM and NestJS and Jest

Many popular NodeJS packages are moving towards ESM-only support. This leads to the necessity to build applications with ESM support as well.

Some dependencies may be built for both, ESM and CommonJS. If, however, deeply in the dependency tree there is an ESM-only package, the application itself must be ESM. It does not suffice to make sure that your own packages are built for ESM if you choose to stay on CommonJS.

NestJS itself currently does not officially support ESM and there are also no plans to change it.