Set up project:
mkdir project
cd project
npm init -y| axios({ | |
| url: 'http://localhost:5000/static/example.pdf', | |
| method: 'GET', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.setAttribute('download', 'file.pdf'); | |
| document.body.appendChild(link); |
| #!/bin/sh | |
| # Install node and npm via nvm - https://github.com/creationix/nvm | |
| # Run this script like - bash script-name.sh | |
| # Define versions | |
| INSTALL_NODE_VER=10 | |
| INSTALL_NVM_VER=0.34.0 |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| #!/bin/bash | |
| set -e | |
| # get package directories based on diff change from last 5 commits | |
| list=$(git diff --name-only HEAD~5..HEAD . | grep -o "packages/\w*" | uniq) | |
| # store root dir | |
| pwd=$PWD |
| { | |
| "compilerOptions": { | |
| "lib": ["es6", "es2016", "es2016.array.include", "es2017", "dom"], | |
| "module": "commonjs", | |
| "noImplicitReturns": true, | |
| "sourceMap": true, | |
| "target": "es2017", | |
| "esModuleInterop": true, | |
| "strictNullChecks": true, | |
| "isolatedModules": true, |
| { | |
| "singleQuote": true, | |
| "printWidth": 120, | |
| "trailingComma": "all" | |
| } |
| { | |
| "env": { | |
| "node": true, | |
| "es6": true | |
| }, | |
| "parser": "@typescript-eslint/parser", | |
| "parserOptions": { | |
| "project": "tsconfig.json", | |
| "sourceType": "module" | |
| }, |
Set the base image to Ubuntu must be first instruction - use docker search to find images
FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)Set the maintainer info
| alias gcl="git clone" | |
| alias gcm="git commit" | |
| alias gps="git push" | |
| alias gpl="git pull" | |
| alias gck="git checkout" | |
| alias gst="git status" | |
| alias src="source" | |
| alias srczsh="source ~/.zshrc" |