gitlab

1.generate the public key

$ cd ~/.ssh
$ ls
authorized_keys2  id_dsa       known_hosts
config            id_dsa.pub


$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/schacon/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/schacon/.ssh/id_rsa.
Your public key has been saved in /Users/schacon/.ssh/id_rsa.pub.
The key fingerprint is:
43:c5:5b:5f:b1:f1:50:43:ad:20:a6:92:6a:1f:9a:3a schacon@agadorlaptop.local


$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU
GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3
Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA
t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En
mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx
NrRFi9wrf+M7Q== schacon@agadorlaptop.local

2.upload public key

3.Local directory add git path

git remote add origin git@gitlab.fabcloud.org:academany/fabacademy/2018/labs/fablabbeijing/students/jack-zhang.git

note:clear local repository

git gc --prune=now

exclude files in git

edit .git/info/exclude

# git ls-files --others --exclude-from=.git/info/exclude

# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
.gradle/
.idea/
.settings/
appcompat_v7/
bin/
build/
gen/
gradle/
out/
proguard/
ship/
target/
.classpath
.gitignore
.idea
.project
.readme
.update-config
*.iml
local.properties

markdown convert html

Markdown is easy to write, but it needs to be opened with ReText when previewed. And ReText seems to be a Qt program. When opening files, it is not as smooth as other editors. So I want to find a tool that can turn markdown files into HTML format. I even searched for a long time, markdown2html (GitHub can search several projects…), but didn’t notice the warning displayed when the terminal input html2markdown.

$ html2markdown

The program “html2markdown” has not been installed. You can use the following commands to install:

sudo apt-get install pandoc

Later installed pandoc (sudo apt-get install pandoc), in fact, just look at the help to know how to use:

$ pandoc -h
pandoc [OPTIONS] [FILES]
Input formats:  native, markdown, markdown+lhs, rst, rst+lhs, html, latex, latex+lhs
Output formats:  native, html, html+lhs, s5, docbook, opendocument, odt, latex, latex+lhs, context, texinfo, man, markdown, markdown+lhs, plain, rst, rst+lhs, mediawiki, rtf
Options:
  -f FORMAT, -r FORMAT  --from=FORMAT, --read=FORMAT                    
  -t FORMAT, -w FORMAT  --to=FORMAT, --write=FORMAT                     
  -s                    --standalone                                    
  -o FILENAME           --output=FILENAME                               
  -p                    --preserve-tabs                                 
            --tab-stop=TABSTOP                              
            --strict                                        
            --reference-links                               
  -R                    --parse-raw                                     
  -S                    --smart                                         
  -m[URL]               --latexmathml[=URL], --asciimathml[=URL]        
            --mathml[=URL]                                  
            --mimetex[=URL]                                 
            --jsmath[=URL]                                  
            --gladtex                                       
  -i                    --incremental                                   
            --xetex                                         
  -N                    --number-sections                               
            --no-wrap                                       
            --sanitize-html                                 
            --email-obfuscation=none|javascript|references  
            --id-prefix=STRING                              
            --indented-code-classes=STRING                  
            --toc, --table-of-contents                      
            --base-header-level=LEVEL                       
            --template=FILENAME                             
  -V FILENAME           --variable=FILENAME                             
  -c URL                --css=URL                                       
  -H FILENAME           --include-in-header=FILENAME                    
  -B FILENAME           --include-before-body=FILENAME                  
  -A FILENAME           --include-after-body=FILENAME                   
  -C FILENAME           --custom-header=FILENAME                        
  -T STRING             --title-prefix=STRING                           
            --reference-odt=FILENAME                        
  -D FORMAT             --print-default-template=FORMAT                 
            --data-dir=DIRECTORY                            
            --dump-args                                     
            --ignore-args                                   
  -v                    --version                                       
  -h                    --help

more than I have expected! markdown/rst/html/latex can translate!

Using the pandoc command can be casually converted, example, demo.md output to demo.html:

$pandoc -f markdown -t html -o demo.html demo.md

or

$pandoc -f markdown -t html -o demo.html demo.md