Try โ€‚โ€‰HackMD

HackMD

Best way to write and share your knowledge in markdown.


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

Max Wu

NTUT CSIE graduate student
Current Team Lead of HackMD

Trying to build a new world with keyboard;
I'm dreaming instead of coding.


HackMD

Realtime collaborative markdown notes on all platforms.


Methology

  • realtime (real-time) - around 10~20ms
  • collaborative - work together
  • markdown - let's talk about this later
  • all platforms - across desktop, mobile, tablet

Statistics

  • More than 120,000 notes have been taken on us
  • More than 72,000 users actively using us every month
  • More than 4,500 people writing on us every day
  • Our repo have been starred more than 1,900 times
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • Thank you
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

Markdown

  • Lightweight
  • Visual friendly
  • Markup language
  • CommonMark is hot
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • Parse as you wish!

Who use it?

  • GitHub / Bitbucket / GitLab
  • Stack Overflow
  • Reddit
  • You
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

What HackMD do?

  • Make markdown collaborative!
  • Fulfill more engineers writing needs
  • Integrate docs to workflow deeper
  • Standandrize publishing via format and meta
  • We would love hear you voice
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

What you can do with HackMD?

  • Notes
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • Docs
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • Slides
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  • Blogs
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

Why not own one?

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’
WITH THE DOCKER POWER
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’


docker-hackmd


Get started

  1. You need
    • docker
    • docker-machine
    • docker-compose

You can get them from:

  • Docker Toolbox
  • Docker Community Edition

  1. Start docker with terminal
  2. Get our repo via git
git clone https://github.com/hackmdio/docker-hackmd.git

  1. Change directory to it
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
  2. docker-compose up in your terminal
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  1. It will auto fetch postgresql and hackmd images
  2. WAIT FRO FEW MINUTES
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  1. Open any browser and surf <machine IP>:3000

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  2. Now you can have it

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’


HackMD Desktop


Connect it to your container!

  1. Menu -> Edit -> Customize HackMD server
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’

  1. Type localhost:3000 and Save
  2. Feel the epic
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’


How To: Minimize docker image for Node.js

  • Most size are from the base image
    • Node.js official image are built with Debain and Alpine
    • Alpine is smaller but lacking support of some package (phantom.js)
    • Current LTS is boron (6.10)
    • https://github.com/nodejs/docker-node

How To: Minimize docker image for Node.js (cont.)

  • Every RUN will cause a new layer
    • Concat all related commands to reduce layers
    • Layers can be cached so don't make them all to one

How To: Minimize docker image for Node.js (cont.)

  • can be fat
    • Only clone the branch that you need
    • Clone in --depth 1 to use a shallow copy
    • Remove .git directory after clone

How To: Minimize docker image for Node.js (cont.)

  • The npm modules
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More โ†’
    • Please specify dev dependencies
    • Clean with npm prune --production

How To: Minimize docker image for Node.js (cont.)


Thanks for listening
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

https://hackmd.io/s/Hk39SWD0x

Max Wu @ DigitalOcean Hsinchu meetup