Skip to content

Instantly share code, notes, and snippets.

@Abby805
Abby805 / SassMeister-input.scss
Last active August 29, 2015 14:19
Nth-child mixin
//Mixin
@mixin nth-child($i...) {
$selectors: ();
@each $num in $i {
$selectors: join($selectors, unquote('&:nth-child(#{$num})'), comma);
}
#{$selectors} {
@content;
@Abby805
Abby805 / Makefile
Created October 24, 2018 15:11
Makefile - FH
include .env
.PHONY: up down stop prune ps shell dbdump dbrestore uli cim cex
default: up
up:
@echo "Starting up containers for for $(PROJECT_NAME)..."
docker-compose pull
docker-compose up -d --remove-orphans
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
docker system prune -a
docker rm -vf $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
@Abby805
Abby805 / common_preprocesses.theme
Created June 5, 2019 13:11
Common D8 Preprocess Functions
<?php
/**
* @file
* Example of some commonly used functions.
*/
use Drupal\Core\Link;
use Drupal\Core\Url;
use Drupal\Component\Utility\Html;
@Abby805
Abby805 / Patches
Last active December 6, 2022 15:44
Generating patches via command line
# Generates patch file between two directories
git diff --no-index directoryOldVersion directoryNewVersion > some-file-name.patch