發表文章

目前顯示的是 7月, 2017的文章

OpenCart2 的密碼編碼方式

OpenCart2 的密碼編碼方式

Web App Manifest

把 WEB APP 圖示放到桌面, 啟動時候有各轉場的動作。 這篇寫得很清楚 https://developer.mozilla.org/en-US/Apps/Progressive https://developers.google.com/web/updates/2014/11/Support-for-installable-web-apps-with-webapp-manifest-in-chrome-38-for-Android https://w3c.github.io/manifest/ 最常見的應用 https://makeappicon.com/webclip https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

Nginx Ip Whitelist (白名單快速轉成 nginx 使用的清單)

圖片
Nginx Ip Whitelist by pass whitelist ref: http://www.kitploit.com/2016/11/fireaway-next-generation-firewall-audit.html # 白名單設定方式可以參考 stackoverflow 這一篇 https://stackoverflow.com/questions/13917866/nginx-ip-whitelist # 中文可以參考這一篇 https://www.centos.bz/question/nginx-ip-whitelist/ 想把白名單快速轉成 nginx 使用的清單, 但是又不想寫太多程式。 所以直接用 google spreadsheets 轉成 csv 功能 透過 linux shell script 轉換成為 nginx 可以使用的清單 在實際工作動作: 客服人員:編輯 spreadsheets 檔案 系統人員:白名單轉成檔案驗證,並 reload nginx 生效. ## ---------------------------------------------------- ## linux script ## ---------------------------------------------------- #!/bin/bash # 編輯網址 , google doc 權限設定控制 # 將 google doc 白名單取出成為 csv URL="https://docs.google.com/spreadsheets/d/{請改成你的網址}/pub?gid=0&single=true&output=csv" echo "w3m -dump '${URL}' > whitelist.csv" | sh # 備份原本的白名單 mv -f customer_ip customer_ip.bak echo "# $(date -R) update." > customer_ip # 去除註解 grep -v '#' "whitel...

推力(Nudge):決定你的健康、財富與快樂

圖片
推力:決定你的健康、財富與快樂 此書的作者 http://www.books.com.tw/exep/prod/booksfile.php?item=0010445555 推力:決定你的健康、財富與快樂 Nudge: Improving Decisions About Health, Wealth, and Happiness 演講內容: 作者:Richard Thaler 在Google的演講 http://www.youtube.com/watch?v=Dz9K25ECIpU 泛科學有一篇寫得很清楚, 可以快速的了解這本書要傳達的概念。 http://pansci.asia/archives/69875 傳統的文字激勵法 荷蘭機場的蒼蠅便斗

Linux Performance 效能評估工具

圖片
這個文章說明了系統個連接點的效能評估工具與方式。 http://www.brendangregg.com/linuxperf.html netflix 工程師先透過 10 個工具在 60 秒告訴你,系統的效能摘要狀況... http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html 接下來要仔細的分析效能上面的問題,透過 Brendan’s Linux Performance Tools tutorial 的這一篇文章來解釋。 每個指令都是獨有專精的效能評估工具 例如 : perf https://perf.wiki.kernel.org/index.php/Main_Page 他是可以顯示CPU 上面資訊的計數器 及分析軟體、硬體的性能。 http://wiki.csie.ncku.edu.tw/embedded/perf-tutorial    成大資工WIKI 看起來就是折磨研究生的工具,但是工程師的好朋友。(泣...) 其他就慢慢研究,遇到再來使用了。

HTML5 OpenSource Code Game 免費開放原始碼遊戲

圖片
很多 Opensource Game code IN GITHUB https://github.com/leereilly/games  這份 README 推薦很多遊戲連結 簡易角子機 Opensource html5 game https://github.com/clintbellanger/Karma-Slots 免費的 HTML5 GAME 原始碼 http://www.java2s.com/Open-Source/Javascript_Free_Code/Game_HTML5/List_of_Free_code_Game_HTML5.htm W3C 上面的HTML5遊戲教學 https://www.w3cschool.cn/html5/html5-game2.html 捕魚機 HTML5原始碼 http://www.htmleaf.com/html5/html5youxi/2014100552.html

Bitnami 的預設安裝 VM 及容器服務

圖片
https://bitnami.com/   是一個提供預先安裝基礎建設及應用程式的服務網站,可以讓開發人員「初期」不用花太多心思再基礎建設上面,就可以用預先安裝好的服務。 所以先選你要的機器影像檔 VM https://bitnami.com/stack/nginx/virtual-machine 因為我用的是 Linux KVM 但上面只提供 .OVA 格式,所以需要轉換一下格式。 https://wiki.hackzine.org/sysadmin/kvm-import-ova.html   KVM: Importing an OVA appliance 然後就是設定 KVM 的 Machine 了!! (略) 設定好後,把 SSH 打開最重要的。 https://docs.bitnami.com/virtual-machine/faq/ 至於服務該如何使用,可以參考他的文件說明 https://docs.bitnami.com/virtual-machine/infrastructure/nginx/ 其他的操作,就和一般使用 Linux 是一樣的。很快速的你就可以有一個可靠的開發環境了。 最後,bitnami 會自動回傳統計資訊回他的網站,記得把他關閉。