Skip to content

Instantly share code, notes, and snippets.

View mnoah66's full-sized avatar

Martin Noah mnoah66

View GitHub Profile
@tuetenk0pp
tuetenk0pp / media-workflow-jellyfin.md
Last active February 22, 2024 06:16
Media Workflow for Jellyfin
@sstratoti
sstratoti / baby_buddy.yaml
Created February 7, 2021 17:59
BabyBuddy Package
sensor:
- platform: rest
scan_interval: 15
name: BabyBuddy Feedings
resource: https://babybuddy.YOURDOMAIN.com/api/feedings/?limit=20
value_template: N/A
json_attributes:
- results
headers:
Authorization: !secret baby_buddy_token
- cards:
- color: black
color_type: icon
custom_fields:
color: |
[[[
return `<span style="color: var(--text-color-sensor);">${states['sensor.bb_last_diaper_change_color'].state}</span>`
]]]
dow: |
[[[
@ryanpitts
ryanpitts / gist:1304725
Created October 21, 2011 19:34
GROUP BY and Select MAX from each group in Django, 2 queries
'''
given a Model with:
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES)
pubdate = models.DateTimeField(default=datetime.now)
<other fields>
Fetch the item from each category with the latest pubdate.
'''