Skip to content

Instantly share code, notes, and snippets.

@Auxx
Auxx / api.ejs
Created September 25, 2025 13:59
HttpClient Swagger template
<%
const { apiConfig, routes, utils, config } = it;
const { info, servers, externalDocs } = apiConfig;
const { _, require, formatDescription } = utils;
const server = (servers && servers[0]) || { url: "" };
const descriptionLines = _.compact([
`@title ${info.title || "No title"}`,
info.version && `@version ${info.version}`,
type: grid
cards:
- type: gauge
entity: sensor.lr_carbon_filter_days_left
min: 0
max: 30
severity:
green: 15
yellow: 7
red: 3
@Auxx
Auxx / app.module.ts
Created October 4, 2019 21:26
Angular project as WebComponents container
import { BrowserModule } from '@angular/platform-browser';
import { ComponentFactoryResolver, DoBootstrap, Injector, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { createCustomElement, NgElementConfig } from '@angular/elements';
import { FirstComponent } from './components/first/first.component';
import { SecondComponent } from './components/second/second.component';
const entryComponents = [
FirstComponent,
@Auxx
Auxx / aliases.ps
Last active May 20, 2019 17:29
Git aliases for PowerShell
Remove-Item alias:gc -force
Remove-Item alias:gp -force
function gs {
git status $args
}
function gd {
git diff $args
}