Skip to content

Instantly share code, notes, and snippets.

@thomasloven
thomasloven / my-custom-card.js
Last active July 16, 2024 22:17
Simplest custom card
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"
@LinusBorg
LinusBorg / module.js
Last active March 9, 2020 19:53
Compiler Module for vue-loader to remove data-test attributes
/*
*
* Usage:
* compilerModules: [
* createDataAttributeRemover(['test', 'test-data'])
* ]
*
*/
function createDataAttributeRemover(attributes = []) {
return {
@jordan-brough
jordan-brough / git-recent
Last active June 27, 2024 21:22
Git: Display a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd
# See also: https://stackoverflow.com/a/25095062/58876
# Download this script as "git-recent" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git recent` from inside any git repo.
# Examples: