This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i @angular/router | |
import '@angular/router/angular1/angular_1_router'; | |
angular.module('application', [ | |
'ngComponentRouter' | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bookshelf = Bookshelf(knex).plugin('virtuals'); | |
const alias = (property) => ({ | |
get: function () { | |
return this.get(property) | |
}, | |
set: function (value) { | |
this.set(property, value) | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
const path = require('path'); | |
const temp = process.cwd(); | |
process.chdir(path.resolve(__dirname, '../')); | |
require('config'); | |
process.chdir(temp); | |
require('babel-register')({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('babel-register')({ | |
presets: ['es2015', 'stage-0'], | |
only: 'my-cli/@(src|bin)/*.js' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import Koa from 'koa'; | |
import KoaRouter from 'koa-router'; | |
import {SerialPort} from 'serialport'; | |
const path = '/dev/ttyAMA0'; | |
const options = {baudrate: 9600}; | |
const port = new SerialPort(path, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
npm init --y | |
cat > .editorconfig <<EOF | |
root = true | |
[*.{md,js}] | |
indent_style = space | |
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:6 | |
ADD server.js /server.js | |
CMD ["node", "/server.js"] | |
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:6 | |
ADD server.js /server.js | |
ADD cert.pem /cert.pem | |
ADD key.pem /key.pem | |
CMD ["node", "/server.js"] | |
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get -y install net-tools iputils-ping vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove all stopped containers | |
docker rm $(docker ps -a | grep "Exited" | cut -d " " -f1) | |
# Remove all images | |
docker rmi $(docker images | tail -n +2 | awk '{ print $3; }') | |
# Stop all containers except docker-registry | |
docker stop $(docker ps -a | grep -v "docker-registry" | tail -n +2 | cut -d " " -f1) | |
# Remove all containers except docker-registry |
OlderNewer