ISO/TR 80002-2:2017 筆記

名詞:

Confidence-building activities: 建立信任的活動

Critical Thinking : 批判性思考,分析後可導出軟體確效方式.須避免使用one-size-fits-all來確效所有軟體.

Throughout the life cycle of software for medical device quality system , appropriate controls need to place to ensure that the software performs as intended. 醫療設備品質系統的軟體生命週期期間, 需要適當的管制確保軟體施行的需要.

如何安裝php加解密套件 ionCube

php網站開發商為了保護自己的程式, 常常使用ionCube這個套件將程式加密,

因此咖啡偶拿到廠商的程式, 需要安裝ionCube解開執行:

1 下載並解開
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

2 複製與php對應版本之so或是dll檔案
例如php是5.6
cp ioncube_loader_lin_5.6.so /usr/lib64/php/modules/

3. php.ini新增一筆
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.6.so

4. 檢查是否成功

php -m

超簡單安裝collabora online

collabora online 加上 nextcloud 或 owncloud 可以實現線上協同編輯的功能, 很猛!

docker run -t -d -p 9980:9980 -e "domain=<your-dot-escaped-domain>" -e "username=admin" -e "password=your_password" --restart always --name collabora collabora/code
EX:
docker run -t -d -p 9980:9980 -e "domain=next\\.fromtw\\.com" -e "username=admin" -e "password=your_password" --restart always --name collabora collabora/code 

以上安裝collabora online 指令中, domain=nextcloud\\.fromtw\\.com代表允許next.fromtw.com這個網址使用協同編輯,

若需要多個網址,請加上 |

記得搭配 letsencrypt 讓collabora 擁有 https 加密功能 ,   安裝完畢,

ps. 網址https://collabora.fromtw.com/loleaflet/dist/admin/admin.html , 可查詢是否成功.(需輸入以上設定帳密)

**nextcloud,

找出 collabora online app 並安裝 , 並設定collabora online的https網址, 這樣就能實現文件線上協同編輯的功能.

**owncloud,

需要到 https://marketplace.owncloud.com/apps/richdocuments 這個地方下載, 然後複製到owncloud app區解開才能安裝, 安裝後找出設定,把collabor的網址輸入進去就可以使用了

ps. 若collabora online 為內部service, 需要透過對外的httpd proxy接應, 因此httpd proxy的設定如下:

 <VirtualHost *:443>
  ServerName collabora.fromtw.com:443
  Options -Indexes

  # SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
  SSLEngine on
  SSLCertificateFile /etc/letsencrypt/live/collabora.fromtw.com/cert.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/collabora.fromtw.com/privkey.pem
  SSLCACertificateFile /etc/letsencrypt/live/collabora.fromtw.com/fullchain.pem
  SSLProtocol             all -SSLv2 -SSLv3
  SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
  SSLHonorCipherOrder     on

  # Encoded slashes need to be allowed
  AllowEncodedSlashes NoDecode

  # Container uses a unique non-signed certificate
  SSLProxyEngine On
  SSLProxyVerify None
  SSLProxyCheckPeerCN Off
  SSLProxyCheckPeerName Off

  # keep the host
  ProxyPreserveHost On

  # static html, js, images, etc. served from loolwsd
  # loleaflet is the client part of Collabora Online
  ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
  ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet

  # WOPI discovery URL
  ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
  ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery

  # Capabilities
  ProxyPass           /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
  ProxyPassReverse    /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities

  # Main websocket
  ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon

  # Admin Console websocket
  ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws

  # Download as, Fullscreen presentation and Image upload operations
  ProxyPass           /lool https://127.0.0.1:9980/lool
  ProxyPassReverse    /lool https://127.0.0.1:9980/lool
  ProxyPass / https://localhost:9980/
  ProxyPassReverse / https://localhost:9980/
</VirtualHost>

android 新的開源架構androidx, 將一統目前混亂的函式庫架構

請參考這個

AndroidX is the open-source project that the Android team uses to develop, test, package, version and release libraries within Jetpack.

舊版架構對應到androidx可在以下連結找到對應

https://developer.android.com/jetpack/androidx/migrate

小米6刷lineage os注意事項

若是全部重來(format), 請注意第一次重開機時, 不要設定pin code , 否則會導致進twrp時, 無法解碼(decrypt data), 請全部開機成功後,再設定pin code .

若是進twrp解碼真的有問題, 請雙清後, 再刪除/data/system/ 裡面 所有.key 檔案, 與locksetting字樣的檔案. 然後重新開機,進入初始狀態(一樣不要設定pin code).

jgit for android version

前一陣子突然想在android玩git , 因此測試了一下Eclipse 內的 jgit library

發現原本我的 InMethodJakarta 專案所含的 jgit 4.6 版library 居然無法相容android,

最後終於發現 jgit 4.6以後至少要java 8, 但 android 有些不相容.

測試了好久, 從最新的jgit 5.4版本降測到3.7.1, 終於成功了. 又再往上測試到4.5版也可相容 android , 因此寫下來做個紀念

下載的地方在這裡

docker 安裝pptpd vpn

1. 安裝

docker volume create pptp-chap 
docker run -d --name pptpd --restart always --privileged --net=host  -v pptp-chap:/etc/ppp mobtitude/vpn-pptp

2. 修改密碼檔案(volumes/是docker的volumes目錄, pptp-chap是docker的volumes代號)

vi  volumes/pptp-chap/_data/chap-secrets

3. 加上防火牆

firewall-cmd --permanent --zone=public --direct --remove-rule ipv4 filter INPUT 0 -p gre -j ACCEPT
firewall-cmd --permanent --zone=public --add-port=1723/tcp
firewall-cmd --permanent --zone=public --add-masquerade
firewall-cmd --reload

參考連結

https://github.com/mobtitude/docker-vpn-pptp

docker 安裝 restyaboard (一種看板軟體)

**安裝前必須先安裝postgres (因為restyaboard是docker安裝, 因此postgres也建議用docker安裝)

也必須先行建立資料庫 restyaboard , 存取的使用者,與密碼 ,

docker run --rm -d -e POSTGRES_DB='restyaboard' \
-e POSTGRES_HOST='postgres' \
--link <docker postgres名稱>:postgres \
-e POSTGRES_PASSWORD='admin' \
-e POSTGRES_USER='admin' \
-p 8080:80 \
--name restyaboard restyaplatform/restyaboard:dev

完成後, 可以http登入8080 ,

輸入預設帳號admin , 密碼restya

1 2 3 4 5 ... 29