Skip to content

Instantly share code, notes, and snippets.

View zsoldosp's full-sized avatar

Peter Zsoldos zsoldosp

View GitHub Profile
@zsoldosp
zsoldosp / data.yml
Last active September 25, 2015 20:43
avoiding duplication in yaml files. Heard about from @beerops https://twitter.com/beerops/status/647499854499987456 then googled and found https://gist.github.com/bowsersenior/979804
default: &DEFAULT
URL: stooges.com
throw_pies?: true
stooges: &stooge_list
larry: first_stooge
moe: second_stooge
curly: third_stooge
development:
<<: *DEFAULT
import pytest
from django.core.cache import caches
@pytest.fixture()
def django_caches():
yield caches
# finalizer
for cache in caches.all():
cache.clear()
.PHONY: tag
SHELL=bash
# assuming v0.1.0 is the only tag in the repo
tag: nr_of_existing_tags := $(shell git tag | grep "\<${TAG}\>" | wc -l)
tag:
@echo ${nr_of_existing_tags}
ifeq (1,$(nr_of_existing_tags))
@echo tag ${TAG} already present ${nr_of_existing_tags}
else
#### Tie display strings
class OnTieBothDisplayed(object):
def tie_str(self):
return '{}-All'.format(self)
def __str__(self):
return self.__class__.__name__