- Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
- Make MailHog as a service
| from paypalrestsdk.resource import List, Find, Create, Post, Update, Replace, Resource | |
| from paypalrestsdk.api import default as default_api | |
| import paypalrestsdk.util as util | |
| from paypalrestsdk.exceptions import MissingParam | |
| class Sale(Find, Post): | |
| """Sale class wrapping the REST v1/payments/sale endpoint | |
| Usage:: |
| import React, { Component } from 'react' | |
| import { Upload, Form, Icon } from "antd"; | |
| const formItemLayout = { | |
| labelCol: { | |
| xs: { span: 24 }, | |
| sm: { span: 5 }, | |
| }, | |
| wrapperCol: { | |
| xs: { span: 24 }, | |
| sm: { span: 18 }, |
| from paypalrestsdk.resource import List, Find, Create, Post, Update, Replace, Resource | |
| from paypalrestsdk.api import default as default_api | |
| import paypalrestsdk.util as util | |
| from paypalrestsdk.exceptions import MissingParam | |
| class Sale(Find, Post): | |
| """Sale class wrapping the REST v1/payments/sale endpoint | |
| Usage:: |
| import React, { Component } from 'react'; | |
| import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | |
| import { Layout, Menu, Icon } from 'antd'; | |
| import Dashboard from './containers/Dashboard/Dashboard'; | |
| import Meseros from './containers/Meseros/Meseros'; | |
| const { Header, Content, Footer, Sider } = Layout; | |
| const SubMenu = Menu.SubMenu; |
| @REM How to use before run this batch: You need Bitvise SSH Client and NSSM. if you haven't, google it and download and install. | |
| @REM 1. open bitvise SSG Client | |
| @REM 2. click "New Profile" to save profile. | |
| @REM 3. configure SSH infomation, tunnels, etc. | |
| @REM 4. click "Save Profile" to save profile. | |
| @REM 5. on "sensitive" dialog popup, check "any account on this computer" or below to service account can connect it. | |
| @REM 6. click "Login" to connect and test SSH Connection. | |
| @REM 7. click "Accept & Save" if you see host key dialog popup. | |
| @REM 8. Click "host key manager" | |
| @REM 9. select your SSH host and click "Export". then click "Bitvise format" and save host key file. |
| # Mailhog | |
| MAIL_MAILER=smtp | |
| MAIL_HOST=0.0.0.0 | |
| MAIL_PORT=1025 | |
| MAIL_USERNAME=null | |
| MAIL_PASSWORD=null | |
| MAIL_ENCRYPTION=null |
| 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); |