發表文章

LibreOffice Draw 可以編輯PDF

圖片
 昨天最驚訝的事, 一直有再用的 LibreOffice 的軟體,  LibreOffice Draw 可以編輯PDF LibreOffice Office 編輯PDF 原來在 WIKI 都有寫了, 沒遇到還真的不知道. 這樣 Adobe Acrobat 難怪要轉往雲端發展了. XDXD 馬上下載來玩玩吧!!! https://zh-tw.libreoffice.org/  

xshell 3.0 無法登入 ubuntu 2004 LTS 版本

圖片
當你的 xshell or ssh client 無法登入新版的ssh server... no matching key exchange method found. Their of offer: diffie-hellman-group1-sha1. * 錯誤訊息應該長得雷同 # tail /var/log/auth.log Apr 24 13:43:45 mtchang sshd[1537]: Unable to negotiate with 172.24.0.201 port 61949: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se [preauth] * 降版本應該可以好 root@mtchang:~# tail -n 5 /etc/ssh/sshd_config Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 root@jutainet:~# /etc/init.d/ssh restart Restarti...

Ubuntu 19.10 LTS Mini. install 調整Linux內部預設時區

圖片
Ubuntu 19.10  LTS Mini. install 調整Linux內部預設時區 最小安裝 ubuntu 的時候,預設都是設定 UTC +0 的時區,有時候真的很難對時間。 Ubuntu 只要透過安裝 tzdata 就可以設定預設時間了  sudo apt-get install tzdata 如果你已經設定過了,可以透過 sudo dpkg-reconfigure tzdata 重新設定。 詳細過程如下: jangmt@instance-1-tokyo:/usr/share$ sudo apt-get install tzdata Reading package lists... Done Building dependency tree      Reading state information... Done The following NEW packages will be installed:   tzdata 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 208 kB of archives. After this operation, 3534 kB of additional disk space will be used. Get:1 http://asia-northeast1.gce.archive.ubuntu.com/ubuntu eoan/main amd64 tzdata all 2019c-3 [208 kB] Fetched 208 kB in 1s (171 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package tzdata. (Reading database ... 63700 files and directories currently installed.) Preparing to unpack .../tzdata_20...

xshell 舊版無法登入新版的ubuntu ssh 問題

圖片
ssh 使用加密演算法報錯unknown cipher type 找出目前這個版本的 ssh 支援的加密演算法 ssh -Q cipher localhost | paste -d , -s - * 到 /etc/ssh/sshd_config 加到最後面,重新啟動 sshd 就可以了...!! * 把生成的變數參考,可能長的類似下面的,把它貼入 config 。 Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com ref: http://mgalgs.github.io/2014/10/22/enable-arcfour-and-other-fast-ciphers-on-recent-versions-of-openssh.html 圖文不相關 圖文不相關-東京塔 HERMES 圖文不相關

新手工程師練習實作參考

圖片
### 新手工程師練習實作參考 * 因為要學習WEB寫程式的範圍很廣泛,所以這裡提供一個快速的實作目標,讓你快速通過新手村。 * 詳細可以參考這篇: https://github.com/goodjack/developer-roadmap-chinese web developer 但是看完後,多數人會直接放棄。 * 底下提供比較簡單開始的新手村,讓開發者可以自己練習。 * 指說明需要完成的元素,內容請自行想像與設計。當成一個屬於自己的作品呈現空間。 ### 使用純文字編輯器操作系統 * Sublime https://www.sublimetext.com/ * VSCODE https://code.visualstudio.com/ * ATOM https://atom.io/ * NotePAD++ https://notepad-plus-plus.org/zh/ * 熟悉上面至少 2 套文字編輯器,並且可以使用他的外掛。 ### 使用 github 建立一個屬於自己的網站。 * 選一個 GIT 工具, https://git-scm.com/download/gui/windows , 可以選 SourceTree 或 https://git-scm.com/download/win * 需要能夠透過 git 工具上傳及維護網站。 * 了解 git 的 pull , clone , merge, getch, commit, push, add 功能與用法 * 了解 branch, master, orign 使用上的意義 * 參考: https://gitbook.tw/chapters/github/using-github-pages.html ### 使用 bootstrap 4 規劃你的網站版面 * 參考: https://getbootstrap.com/docs/4.1/examples/ * 使用 Grid 排版,編排出一個可以放作品的網站版型。 * 可以善用 bootstrap 的各種元件,完成你的目標。 * 調整你的版面, 讓他在 Mobile 環境下,也可以不會太糟糕。 * 使用自訂的 CSS 讓你的 Bootstrap 4 看起來和別人不一樣。 ### 使用 Jquery 的 API * 使用...

保證瀏覽器連到 https 的功能 (HSTS)

圖片
因為最近遇到一個特殊的 TLD 最上層的網域, 「.app」 ,這個網域預設 HSTS Preload 功能。 這功能一旦被開啟後,歡樂的時光就來臨了...... 網域的擁有者也可以自己設定,HSTS Preload 設定下去,所有連線都需要 SSL 的功能 ,於是它就有了 1. 無論是否有設定 HTTPS ,瀏覽器都會轉向 HTTPS 2. 可以抵禦SSL剝離攻擊,防網站劫持。 3. 不能隨意關掉 HTTPS,萬一憑證不見或過期,只好被 BROWSER 檔掉或警告。 4. HSTS會在一定時間後失效(有效期由max-age指定) ,但是沒有人會只設定一天過期。 * 你可以到這裡檢查,網址是否被 HSTS Preload 了....   * https://hstspreload.org     * 如果設定了,但是時間還沒有過期你可以參考這裡暫時移除   * https://www.thesslstore.com/blog/clear-hsts-settings-chrome-firefox/   * https://ephrain.net/chrome-%E5%B0%87%E7%B6%B2%E7%AB%99%E5%BE%9E-hsts-%E6%B8%85%E5%96%AE%E4%B8%AD%E7%A7%BB%E9%99%A4/   * https://blog.bennyling.cc/362/clear-google-chrome-hsts-setting /    * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security 目前已經支援的瀏覽器

MQTT 的文件

圖片
幾個重點整理: 提供三種訊息傳送服務的QoS QoS0:At most once 最多一次 QoS1:At least once 至少一次 QoS2:Exactly once 確保一次 減少封包傳送時的負擔,同時減少網路所需之頻寬 Last Will and Testament(最後遺囑) 機制 主題萬用字元(Topic Wildcard Characters)   CONNECT 當Client(客戶端)對Broker建立起TCP/IP socket連線時,需傳送Message Type為CONNECT的訊息,Broker端會回傳Message Type為CONNACK的確認訊息。   DISCONNECT DISCONNECT訊息被傳送至Broker,表示需要關閉TCP/IP連線,若在連線時設置Clean Session,Broker清除此Client連線時所有的設定,包括訂閱的主題。 PUBLISH Publish訊息會因為所使用的QoS有不同的工作流程。若QoS設置為0,訊息會透過底層的TCP/IP連線傳輸訊息,並不預期有任何的回應,也不會重新傳送,故訊息可能傳送至Broker 一次,或是沒有傳送成功。 PING 在TCP/IP的連線中會在一固定時間傳送一心跳值確保其連線的暢通,MQTT通訊協議中以PINGREQ訊息傳送至Broker確保連線狀態,Broker回傳PINGRESP訊息回覆Client此連線是否正常。 ref: https://zh.wikipedia.org/wiki/MQTT https://swf.com.tw/?p=1002 http://designer.mech.yzu.edu.tw/articlesystem/article/compressedfile/(2016-07-15)%20%E7%AC%AC%E4%B8%89%E7%AB%A0%20MQTT%E9%80%9A%E8%A8%8A%E5%8D%94%E8%AD%B0.aspx?ArchID=2621