快轉到主要內容

Tutorial

Docker 內 Laravel 8 瀏覽器測試 dusk 安裝配置指南

Docker 內 Laravel 8 瀏覽器測試 dusk 安裝配置指南

·488 字·1 分鐘
docker-compose.yml # 本指南運行環境系 MacBook 上的 Docker 內,相關容器配置如下: 1# docker-compose.yml 2version: '3' 3services: 4 mysql: 5 image: mariadb:10.2 6 restart: always 7 volumes: 8 - '~/Documents/Datas/laravel/mysql:/var/lib/mysql' 9 ports: 10 - '127.0.0.1:23306:3306' 11 environment: 12 MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' 13 MYSQL_DATABASE: 'puppy' 14 laravel: 15 image: ycheung/laravel-dev 16 restart: always 17 ports: 18 - '8081:80' 19 - '9001:9001' 20 volumes: 21 - '~/Documents/laravel:/var/www/html' 22 depends_on: 23 - mysql 24 - mailhog 25 mailhog: 26 image: mailhog/mailhog 27 ports: 28 - "1025:1025" 29 - "8025:8025" 30 selenium-hub: 31 image: selenium/hub 32 container_name: selenium-hub 33 ports: 34 - "4444:4444" 35 chrome: 36 image: selenium/node-chrome 37 volumes: 38 - '/dev/shm:/dev/shm' 39 depends_on: 40 - selenium-hub 41 environment: 42 - HUB_HOST=selenium-hub 43 - HUB_PORT=4444 44 - JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps= 安裝 Laravel Dusk # 1composer require --dev laravel/dusk composer install dusk 執行安裝腳本 # 執行安裝腳本,生成測試目錄 tests/Browser 和示例測試文件
Android 使用 Volley 下載文件附進度條

Android 使用 Volley 下載文件附進度條

·801 字·2 分鐘
Volley官方文檔說: “Volley is not suitable for large download or streaming operations, since Volley holds all responses in memory during parsing. For large download operations, consider using an alternative like DownloadManager.” 這是真的,特別是內存小的手機,使用Volley下載很多文件或者單個大文件就不是很恰當了。這裡的large是相對手機內存大小而定。
Windows下強制使用Chrome全屏模式

Windows下強制使用Chrome全屏模式

·361 字·1 分鐘
一般情況下,按 F12 可以讓Chrome瀏覽器進入全屏模式。 如需啟動Chrome時就以全屏模式打開某指定網頁,可以使用kiosk參數。具體操作如下: 在Chrome中創建某地址的快捷方式,比如我創建一個Google的。
Unity3D接入MySQL数据库

Unity3D接入MySQL数据库

·637 字·2 分鐘
系統环境: # Windows 10(x64)(version 1909) Unity3D (version 2018.3.0f2) Microsoft Visual Studio Community 2017 (version 15.9.4) 操作步驟: # 准備一個本地/綫上Mysql數據庫 # Y Cheung 的數據庫設置如下:
再談網站HTTPS升級

再談網站HTTPS升級

·2100 字·5 分鐘
Y.Cheung 曾於 2016 年時寫過一篇《 Centos 7 使用 certbot 安裝Let’s Encrypt SSL 證書 》,最近因爲幫忙升級了幾個站點,使用了一些免費/收費的SSL憑證服務,特寫此篇記錄一下流程思路送給整天吐槽Y.Cheung沒耐心教人的某只。