file=`sudo docker inspect --format='{{.LogPath}}' ${id}` sudo truncate -s 0 $file
Wednesday, October 4, 2017
Truncate docker logs
Set $id to the container id prefix and then run:
Sunday, January 15, 2017
Angular 2 and jsPlumb
Here's an example showing how to start using jsPlumb with Angular 2.
Create a new project using the Angular CLI and add the jsPlumb package:
Add the jsPlumb script to angular-cli.json:
Create a new project using the Angular CLI and add the jsPlumb package:
ng new PROJECT_NAME cd PROJECT_NAME npm install jsplumb --save
Add the jsPlumb script to angular-cli.json:
"scripts": [ "../node_modules/jsplumb/dist/js/jsplumb.min.js" ],Modify the app component:
import { Component, ViewChild } from '@angular/core'; declare var jsPlumb:any; @Component({ selector: 'app-root', template: '<div #test>Test</div>' }) export class AppComponent { @ViewChild('test') testEl; ngAfterViewInit() { let me = this; jsPlumb.ready(function() { jsPlumb.addEndpoint(me.testEl.nativeElement); }); }
Run the server:
ng serve
Subscribe to:
Posts (Atom)