2018年4月26日 星期四

Git To GitHub SSH



產生ssh  用來從command line快速登入  github

目的: 本機可以快速登入  github  這樣就不用每次都還要輸入帳密來登入了...


在 Git Bash 或是  Cmder 裡面....
執行  ls -al ~/.ssh


好吧來生成key
執行  ssh-keygen
這樣就會生成key

看key的內容
執行 cat ~/.ssh/id_rsa.pub

準備複製key的內容,貼到 Github...  SSH and GPG keys
登入Github後右上方人頭旁間有倒立三角型,按下後選 Setting
左邊選單SSH and GPG keys 
會看到右邊綠色按鈕,New SSH Key
把   cat ~/.ssh/id_rsa.pub  查到的內容全部貼上

嘗試登入
ssh -T git@github.com
然後輸入一次帳密,就再也不用輸入囉


Reference:

https://git-scm.com/book/zh-tw/v1/%E4%BC%BA%E6%9C%8D%E5%99%A8%E4%B8%8A%E7%9A%84-Git-%E7%94%9F%E6%88%90-SSH-%E5%85%AC%E9%96%8B%E9%87%91%E9%91%B0


http://trunk-studio.com/blog/ssh-for-windows/

2018年4月25日 星期三

Sublime Text 3 Syntax HTML Missing


Check:
1. View ===>  Syntax
2. Click on Right-Bottom Text .....will show the syntax you got

If your syntax does not exist.... html in my case

check your package folder if html.sublime-package exist

if not, just copy it from somewhere.

Then you will have it again!!!!


2018年4月24日 星期二

MongoDB fast tutorial for windows



1. Download Mongodb
2. During installation, uncheck : install MongoDB Compass  因為會卡住
3. Set Path eg:  C:\mongodb\bin\    Then you can execute   mongo.exe and mongod.exe
4. Set up a MongoDB data folder.  eg: C:\mongodata\
5. In the cmd, execute: mongod --dbpath C:\mongodata\    啟動mongodb  這樣畫面不關就是啟動
6. New a batch file: execute : mongo 127.0.0.1:27017/admin  用管理員權限登入 mongoDB
7. Execute this batch. you can get in mongodb

可以在batch檔加入:
mongod --dbpath C:\mongodata\      啟動資料庫與指定位置
mongo 127.0.0.1:27017/admin        進入互動介面