see on stackoverflow
create your own directive
import { Directive, Input } from '@angular/core';
@Directive({
selector: '[ngInit]'
})| {"lastUpload":"2017-05-04T19:43:19.832Z","extensionVersion":"v2.7.0"} |
| package com.stackoverflow.q3732109; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.net.InetSocketAddress; | |
| import com.sun.net.httpserver.HttpExchange; | |
| import com.sun.net.httpserver.HttpHandler; | |
| import com.sun.net.httpserver.HttpServer; |
| #! /bin/bash | |
| SCRIPT_PATH=$(cd "$(dirname "$0")"; pwd); | |
| # HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt | |
| CERT_NAME=domain | |
| CERT_ROOT=domainroot | |
| DOMAIN_NAME=domain | |
| FOLDER=${SCRIPT_PATH}/certs/self-signed | |
| CERTS_TMP=certs-tmp | |
| cd ${SCRIPT_PATH} |
| FROM opensuse:42.2 | |
| WORKDIR /tmp | |
| #http://rpmfind.net/linux/RPM/opensuse/updates/13.2/i586/java-1_8_0-openjdk-headless-1.8.0.111-33.1.i586.html | |
| RUN zypper --non-interactive in compat-32bit && \ | |
| zypper --non-interactive install wget && \ | |
| wget ftp://rpmfind.net/linux/opensuse/update/13.2/i586/java-1_8_0-openjdk-headless-1.8.0.111-33.1.i586.rpm && \ | |
| zypper --non-interactive install java-1_8_0-openjdk-headless-1.8.0.111-33.1.i586.rpm && \ | |
| rm -f java-1_8_0-openjdk-headless-1.8.0.111-33.1.i586.rpm |
| dockerCleanUp(){ | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited --filter status=created -aq | xargs -r docker rm -v | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
| # remove unused volumes: | |
| docker volume ls -qf dangling=true | xargs -r docker volume rm | |
| } |
| @ECHO OFF | |
| REM -- Automates cygwin installation | |
| REM -- Based on: https://github.com/rtwolf/auto-cygwin-install | |
| REM -- Based on: https://gist.github.com/wjrogers/1016065 | |
| SETLOCAL | |
| REM -- Change to the directory of the executing batch file | |
| CD %~dp0 |
see on stackoverflow
create your own directive
import { Directive, Input } from '@angular/core';
@Directive({
selector: '[ngInit]'
})| const BSON = require('bson'); | |
| const fs = require('fs'); | |
| const bson = new BSON(); | |
| const file = './test.bson'; | |
| const bf = fs.readFileSync(file); | |
| const len = bf.length; | |
| let bfIdx = 0; | |
| const items = []; | |
| console.log('idx',bfIdx,len); | |
| while(bfIdx < len){ |
| function prime_run_fnc(){ | |
| __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia $@ | |
| } | |
| alias prime-run=prime_run_fnc |
| $creds = Get-Credential | |
| $username = $creds.GetNetworkCredential().UserName | |
| $password = $creds.GetNetworkCredential().Password | |
| $proxyServer = "https://local/proxy/server" | |
| $webProxy = New-Object System.Net.WebProxy($proxyServer,$true) | |
| $webclient = new-object System.Net.WebClient | |
| $creds = Get-Credential | |
| $webclient.Proxy=$webproxy | |
| $webclient.Proxy.Credentials = $creds |