侯漢廷 兩岸建議
https://youtu.be/HLHA951azDw?t=441
https://youtu.be/HLHA951azDw?t=441
Stickies
ELK 教學 - 定期清除 Elasticsearch 資料 https://blog.johnwu.cc/article/elk-purge-elasticsearch-index.html https://www.elastic.co/guide/en/elasticsearch/client/curator/current/configfile.html https://www.elastic.co/guide/en/elasticsearch/client/curator/current/ex_delete_indices.html https://anjia0532.github.io/2017/04/06/elasticsearch-delete-indices-by-date/ config.yml # Remember, leave a key empty if there is no value. None will be a string, # not a Python "NoneType" client: hosts: - xxx.xxx.xxx.xxx port: 9200 url_prefix: use_ssl: False certificate: client_cert: client_key: ssl_no_validate: False http_auth: timeout: 30 #timeout: 60 master_only: False logging: loglevel: INFO logfile: logformat: default blacklist: ['elasticsearch', 'urllib3'] curator_filebeat.yml # Remember, leave a key empty if there is no value. None will be a string, # not a Python "NoneType" # # Also remember that all examples have 'disable_action' set to True. If you # want to use this action as a template, be sure to set this to False after # copying it. actions: 1: action: delete_indices description: >- Delete indices older than 30 days (based on index name), for logstash- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly. options: ignore_empty_list: True disable_action: False filters: - filtertype: pattern kind: prefix value: filebeat- - filtertype: age source: name direction: older timestring: '%Y.%m.%d' unit: days unit_count: 30 curator_heartbeat.yml ...
How to UI show with flutter And Some flutter action
今天找到一篇有分享經驗的文章 http://sueboy.blogspot.com/2019/01/vault.html 1、量大 Vault有機會掛 2、Vault的重啟 需要特定 5把金錀 3把同意 才能開啟,所以人要登入,不然就是要模擬操作 但模擬操作就失去意義 3、服務被更新重啟,又會發生2的情況 Vault就是簡單說就是管理 帳號、密碼、token、金錀,配合上ACL url ,有群組權限等功能 專案角度就是 啟動服務(docker)後,前端直接跟Vault做驗證登入,api url 呼叫是否有權限等,都是Vault會給出回應 能登入否 能存取否 更進階是token 金鑰 時效等等都可以設定,可用Vault的管理介面 當然 會面臨的第一個問題,怎麼建立account 、怎麼判斷(go server要去呼叫Vault,前端也可以呼叫Vault),再來要多一個維護的系統,而且這個系統是最重要的,一掛,所以有的系統都登入不了 真的有比較好嗎? 1、要多一個系統做管理 2、要再多學一個系統操作、設定 3、真的掛了,運用本身沒掛,那……… 4、有bug或是無法滿足特定條件權限時,怎麼辨 好處: 統一方式,除非將來Vault沒了,不然很多專案可以使用
https://medium.com/getamis/vault-dynamic-credentials-fd651d6c28a9 https://medium.com/@gmaliar/dynamic-secrets-on-kubernetes-pods-using-vault-35d9094d169
https://medium.com/getamis/vault-dynamic-credentials-fd651d6c28a9 踩雷區 應同事要求特別寫一下 vault 的雷區,其實上面的 demo.js 最重要的地方就在於 graceful shutdown 時要把目前使用的 credential 給撤銷掉。 你可能會覺得這個 credential 放著也還好,反正時候到了就會過期,不會有太多影響。BUT!! 假如你跟我們一樣 dev 環境是每個 commit 都會 deploy,而且 credential 的過期日期設定的比較長,比如說一個月的話,每天十個 commit,kubernetes 裡面有十個 pod,每個 pod 可能會用到兩三個由 Vault 管理的動態憑證的話,你在資料庫或 IAM User 會膨脹的很快,很快地你就會發現這些為數眾多的 credentials 管理上會造成困難,甚至拖累整個開發環境。 像最近我突然知道原來 AWS IAM User 的預設上限是 5000 人…。 當你有很多 IAM User 的時候,雖然可以透過指令一次把所有由 Vault 管理的 IAM User 撤銷,但是就我們的經驗來說大量 revoke IAM User 的時候,vault 大多都會 timeout (也有可能是因為我們 dev 環境開的資源太少),所以要執行很多次才能把所有使用者刪除,其中還有可能會因為資源太少導致 Vault crash 的狀況,在 production 的狀況 vault 重啟會需要 unseal,此時就會伴隨許多痛苦,甚至 vault 會被不停地打掛,到最後只好到 backend storage 跟 AWS console 裡面手動刪除這些資料。 ...
https://blog.csdn.net/peterwanghao/article/details/83181932
https://ethereum.stackexchange.com/questions/21448/how-to-get-a-contracts-balance-in-solidity function contractbalance() public view returns (uint256){ return address(this).balance; } var thecontract = web3.eth.contract([{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gett","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buy","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Buyvalue","type":"event"}]); var MyContract = thecontract.at('0xbed0229199614a11e47c39d4800420de968627fa'); MyContract.buy({ from:'0x5921a4C1B13afbD4b61d63e9c7BD47741C47B176', value:web3.toWei("1", "ether") }, console.log)
Just try to click website function or action. Like compile, then try again console web3.eth.accounts maybe no error Or var web3 = new Web3(new Web3.providers.HttpProvider(“http://myLocalHostIP:myRpcPort”));
https://remix.ethereum.org/ Method 1: No function name function () payable external { t = msg.value; emit Buyvalue(msg.value); } function () payable external { OR function () external payable { pragma solidity >=0.4.0 <0.6.0; contract SimpleStorage { uint storedData; uint256 t; event Set(address indexed _from, uint value); event Buyvalue(uint tokens); function set(uint x) public { storedData = x; emit Set(msg.sender, x); } function get() public view returns (uint) { return storedData; } function gett() public view returns (uint) { return t; } function () payable external { t = msg.value; emit Buyvalue(msg.value); } } MetaMask can not director send contract address eth, so use console ...
https://www.ethereum.org/token https://theethereum.wiki/w/index.php/ERC20_Token_Standard https://github.com/bokkypoobah/Tokens#fixed-supply-token
和朋友聊天提到 隱私資料,來源不刪除沒關係,但不能被關連到 這點 一開始 我覺得 這跟刪掉來源,同等難度 但 今天看一些區塊鍊文章時,其中有一個點,跟這有關 上鍊後資料無法刪除,那就只能像妳說的,採用 不能被關連到來處理 當然 肯定要有一個完整的關制才行,看將來有沒有人提出了
https://www.samsonhoi.com/677/blockchain-ethereum-testing-network https://www.samsonhoi.com/
https://www.phoronix.com/scan.php?page=article&item=windows2019-linux-bsd&num=1&fbclid=IwAR0VBMPUsmOw_qJQtJ1AzEq4el8KhZMPK9sRmlMN8rLhwZJfFqO32RuefGI
https://www.phoronix.com/scan.php?page=article&item=freebsd-12-zfs&num=1&fbclid=IwAR2utCninwUWUjjt_5IUu-1-rfm3vcCc1SiOvuZrYf4Bu0sW0HVsh9-lvQA
https://medium.com/taipei-ethereum-meetup
https://dappradar.com/
https://medium.com/taipei-ethereum-meetup/ether-shrimp-farm-analysis-e92ab76dc22f
底層採用PVE(Proxmox),建立KVM VM,KVM VM使用docker-machine或是自建用boot2docker iso做好backup,使用時直接restore docker 執行時 Restart policies:always,這樣VM開機就會自動執行,不需要另外再設定。 Volume 直接用docker-compose YAML volume減少權限問題,資料也會儲存在VM內,使用VM後,備份是以VM為主,不用擔心資料遺失 一個VM放多個docker、整組docker-compose 或 一個VM放單一功能docker可以自己決定 VM可以被快照保護,一但出問題,還原後、開完機,VM內的docker會自動起服務,資料也是存在的,減少docker backup&resotre問題 為了管理docker方便,第一次建立VM時,執行Portainer always,可以backup,將來每一個VM都可以利用圖形界面查看docker運作情況 缺點: 硬碟空間使用受限於KVM,擴充大小有可能需要重開機 線上移轉只能以VM,不能用docker,但docker設計上也不走線上移轉 為什麼需要用到docker呢? 因為現在很多專案有直接提供docker使用,確實可以減少大量安裝時間, 但volume資料儲存、權限卻是最大的問題,上述架構可以解決這部份顧慮。