Remix Issues
useMatches
only exposes the filepath, but we want a parameterized route:
8:53:24 AM web.1 | {
8:53:24 AM web.1 | id: 'routes/bottles.$bottleId._index',
8:53:24 AM web.1 | pathname: '/bottles/4/',
from django.db.models.signals import post_init | |
def track_data(*fields): | |
""" | |
Tracks property changes on a model instance. | |
The changed list of properties is refreshed on model initialization | |
and save. | |
>>> @track_data('name') |
blueprint: | |
name: ZHA - Sonoff SNZB-01 | |
description: 'Perform actions with the Sonoff SNZB-01 Button. | |
You can set functions for single press, double press and hold. This allows you to assign, | |
e.g., a scene or anything else.' | |
domain: automation | |
input: | |
remote: |
# dont do this | |
this_function_name(foo, bar | |
baz) | |
# do this | |
cramers_version( | |
foo, bar, baz) | |
# allow this | |
cramers_version(foo, bar, |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
source <(antibody init) | |
antibody bundle < ~/.config/zsh_plugins | |
# TODO(dcramer): literally doesnt work at all | |
# function update_antibody() { | |
# antibody bundle < ~/.config/zsh_plugins > ~/.config/zsh_plugins.sh | |
# } |
apiVersion: networking.gke.io/v1beta1 | |
kind: ManagedCertificate | |
metadata: | |
name: zeus-ci | |
spec: | |
domains: | |
- zeus.ci | |
- updates.zeus.ci | |
--- | |
apiVersion: extensions/v1beta1 |
# get some languages | |
brew 'go' | |
brew 'node' | |
brew 'python' | |
brew 'ruby' | |
# and common dlls | |
brew 'geoip' | |
brew 'libxmlsec1' | |
brew 'openssl' |
{ | |
"extra": {...}, | |
"contexts": { | |
"contxtName": {...}, | |
} | |
} | |
def attach_foreignkey(objects, field, select_related=None): | |
""" | |
Shortcut method which handles a pythonic LEFT OUTER JOIN. | |
``attach_foreignkey(posts, Post.thread)`` | |
""" | |
field = field.field | |
qs = field.rel.to.objects.filter(pk__in=distinct(getattr(o, field.column) for o in objects)) | |
if select_related: | |
qs = qs.select_related(*select_related) |
""" | |
cramermath | |
~~~~~~~~~~ | |
Usage: | |
>>> import cramermath | |
>>> cramermath.log(10) | |
0.014728067495500818 | |
""" |