This file contains hidden or 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
| #!/bin/sh | |
| # Create and activate swap | |
| dd if=/dev/zero of=/swapfile bs=256M count=4 | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| # Activate swapfile on boot | |
| echo "" >> /etc/fstab | |
| echo "/swapfile none swap sw 0 0" >> /etc/fstab |
This file contains hidden or 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
| Suggestion A | |
| _ _ ____ _ ___ | |
| / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| | |
| / _ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | | |
| / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | | |
| /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| | |
| |___/ | |
| Suggestion B |
This file contains hidden or 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
| root@test:~# git clone https://github.com/angular/angular-cli.git | |
| Cloning into 'angular-cli'... | |
| remote: Counting objects: 12248, done. | |
| remote: Compressing objects: 100% (19/19), done. | |
| remote: Total 12248 (delta 2), reused 0 (delta 0), pack-reused 12227 | |
| Receiving objects: 100% (12248/12248), 3.00 MiB | 0 bytes/s, done. | |
| Resolving deltas: 100% (6249/6249), done. | |
| Checking connectivity... done. | |
| root@test:~# cd angular-cli/ | |
| root@test:~/angular-cli# npm i |
This file contains hidden or 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
| /tmp | |
| ❯ mkdir test-deprecation | |
| /tmp | |
| ❯ cd test-deprecation | |
| /tmp/test-deprecation | |
| ❯ npm init -y | |
| Wrote to /private/tmp/test-deprecation/package.json: |
This file contains hidden or 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
| a, p, h1, h2, h3 { | |
| font-family: "Roboto","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; | |
| color: #546E7A; | |
| } | |
| a { | |
| color: #1976D2; | |
| } | |
This file contains hidden or 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
| #!/bin/sh | |
| # Create and activate swap | |
| dd if=/dev/zero of=/swapfile bs=256M count=4 | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| # Activate swapfile on boot | |
| echo "" >> /etc/fstab | |
| echo "/swapfile none swap sw 0 0" >> /etc/fstab |
This file contains hidden or 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
| import { enableProdMode } from '@angular/core'; | |
| import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
| import { AppModule } from './app/app.module'; | |
| import { environment } from './environments/environment'; | |
| import { hmrBootstrap } from './hmr'; | |
| if (environment.production) { | |
| enableProdMode(); |
This file contains hidden or 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
| import { NgModuleRef, ApplicationRef } from '@angular/core'; | |
| import { createNewHosts } from '@angularclass/hmr'; | |
| export const hmrBootstrap = (module: any, bootstrap: () => Promise<NgModuleRef<any>>) => { | |
| let ngModule: NgModuleRef<any>; | |
| module.hot.accept(); | |
| bootstrap().then(mod => ngModule = mod); | |
| module.hot.dispose(() => { | |
| const appRef: ApplicationRef = ngModule.injector.get(ApplicationRef); | |
| const elements = appRef.components.map(c => c.location.nativeElement); |
This file contains hidden or 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
| # Clean up dependencies in packages | |
| nps lerna clean | |
| # Clean up local node_modules | |
| rm -r node_modules | |
| # Install local node_modules | |
| npm install | |
| # Install dependencies in packages | |
| nps setup |
This file contains hidden or 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
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |