Skip to content

Instantly share code, notes, and snippets.

View martonsagi's full-sized avatar

Márton Sági martonsagi

View GitHub Profile
@jsobell
jsobell / deepObserver.ts
Last active February 18, 2022 06:30
Deep observer for Aurelia
/**
* Created by Jason on 29/02/2016.
*
* constructor(public deepobserver:DeepObserver) {
* this.obsDisposer = this.deepobserver.observe(this, 'target', (n,o,p)=>
* { console.log('DATA CHANGED:', p, ':', o,'===>', n ); }
* }
* @bindable target:Object;
*
* To remove bindings, call this.obsDisposer();
<#
.SYNOPSIS
Resize an image
.DESCRIPTION
Resize an image based on a new given height or width or a single dimension and a maintain ratio flag.
The execution of this CmdLet creates a new file named "OriginalName_resized" and maintains the original
file extension
.PARAMETER Width
The new width of the image. Can be given alone with the MaintainRatio flag
.PARAMETER Height