See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
Book by Mark Seemann and Steven van Deursen
This document serves as a distilled summary of the book, tailored for a Node.js and TypeScript context.
Note
At the end of this summary, you will find section How We Do DI at Tactile which outlines our approach to Dependency Injection together with Clean Code and Unit Testing.
The book explores the core concepts of dependency injection, emphasising its role in promoting loose coupling, testability, and adherence to SOLID principles. It covers foundational DI patterns, anti-patterns, and advanced practices like Pure DI, lifetime management and Cross-Cutting Concerns with Aspect Oriented Programming.
| # coding: utf-8 | |
| import unittest | |
| # Unit tests for kata 'domevent' | |
| ''' Synchronous domain events in pure Python. | |
| #- triggering an event | |
| #- registering a callback | |
| #- triggering an event with 1 handler | |
| #- triggering an event with 2 handlers |
| # import signals and slugify | |
| from django.db.models import signals | |
| from django.template.defaultfilters import slugify | |
| # function for use in pre_save | |
| def yourmodel_pre_save(signal, instance, sender, **kwargs): | |
| if not instance.slug: | |
| slug = slugify(instance.attribute) # change the attibute to the field that would be used as a slug | |
| new_slug = slug |
| import base64 | |
| from django.core.files.base import ContentFile | |
| from rest_framework import serializers | |
| class Base64ImageField(serializers.ImageField): | |
| def from_native(self, data): | |
| if isinstance(data, basestring) and data.startswith('data:image'): | |
| # base64 encoded image - decode |
| var gulp = require('gulp'); | |
| var concat = require('gulp-concat'); | |
| var sass = require('gulp-sass'); | |
| var minifyCss = require('gulp-minify-css'); | |
| var rename = require('gulp-rename'); | |
| var gulpBowerFiles = require('gulp-bower-files'); | |
| var paths = { | |
| sass: ['./scss/**/*.scss'], | |
| scripts: ['./app/**/*.js', './app/*.js'] |
| worker_processes 10; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include /etc/nginx/mime.types; | |
| gzip on; |