Skip to content

Instantly share code, notes, and snippets.

View beradrian's full-sized avatar

Adrian Ber beradrian

View GitHub Profile
@KEIII
KEIII / ng-var.directive.ts
Last active November 24, 2021 08:36
Missed Angular *ngVar directive (from https://stackoverflow.com/a/43172992/1847657)
// tslint:disable:no-any directive-selector
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
/**
* Declare a variable in the template.
* Eg. <i *ngVar="false as variable">{{ variable | json }}</i>
*/
@Directive({selector: '[ngVar]'})
export class NgVarDirective {
@vodolaz095
vodolaz095 / clearDockerCache.sh
Created December 8, 2015 20:25
Single command to clear docker containers and cache
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)