Skip to content

Instantly share code, notes, and snippets.

View Eetezadi's full-sized avatar

Sina Sebastian Eetezadi Eetezadi

View GitHub Profile
/// <reference path="../../shelly-script.d.ts" />
// <reference path="../../shelly-script.d.ts" />
// Shelly Script: Router Watchdog
// Monitors internet connectivity and resets router by cycling power when needed
let CONFIG = {
endpoints: [
"https://global.gcping.com/ping",
"https://www.switch.ch",
],
@Eetezadi
Eetezadi / autoresize.ts
Last active February 26, 2017 19:13 — forked from maxt3r/autoresize.ts
Ionic 2 ion-textarea autoresize
// An autoresize directive that works with ion-textarea in Ionic 2
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea>
// Based on https://www.npmjs.com/package/angular2-autosize
import { Directive, HostListener, ElementRef } from "@angular/core";
@Directive({
selector: "ion-textarea[autoresize]" // Attribute selector
})
export class Autoresize {