Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@spali
spali / 10-wancarp
Last active November 7, 2024 16:57
Disable WAN Interface on CARP Backup
#!/usr/local/bin/php
<?php
require_once("config.inc");
require_once("interfaces.inc");
require_once("util.inc");
$subsystem = !empty($argv[1]) ? $argv[1] : '';
$type = !empty($argv[2]) ? $argv[2] : '';
@spali
spali / DynamicComponent.ts
Created December 6, 2016 11:59
Dynamic Module with dynamic Component in Angular 2
import { Component, OnInit, ViewContainerRef, ComponentRef, Compiler, NgModule, OnDestroy } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'dynamic-container',
templateUrl: 'static.component.html'
})
export class DynamicContainerComponent implements OnInit, OnDestroy {
protected componentRef: ComponentRef<any>;