2023/04/07

[面試]求職雜談 可能之後補紀錄

 今天下午面HP的Software QA,感受到雖然自己可能英文需要再加強,

但五個面試我的人給予我極大的尊重,還讓我問問題問到超時,

真的覺得雖然這份工作不一定會錄取我,但一個好的面試體驗能讓人繼續在求職的焦慮中前進。

我在讀我的人生施工中--跨界工地的信仰反思這本書時,

作者提及他在這段工地的日子裡體悟到自己可能早已被毒性的價值觀給汙染,一直都覺得「沒有經濟產出就沒有價值」,在這段日子得以發現其實即便沒有經濟產出,人還是可以做一個有價值的人。

我自己在想在這段求職的日子裡,我不否認我真的很耍廢,但潛意識真的會有那種我是沒工作,所以是沒價值的人的聲音,讀完作者的分享後,我覺得我能避開這個不必要的焦慮,而是思考我的專長、恩賜在哪裡,以及思考該怎麼處理這個存款日漸單薄的困境。

[Laravel]在Windows環境使用Laravel Sail建置環境php artisan migrate

不知道其他人怎麼想,我最近在找繁體中文有關Laravel的免費文章,

大部分都講重點,比較沒有手把手教清楚這些指令後發生了什麼事情

像我看到一篇講Sail的文章,提及.env的DB_HOST的值要是到時候跑mysql container的名字(一開始預設名字就是mysql)

DB_HOST=mysql # sail建置環境要用這句

# DB_HOST=localhost # php artisan migrate 要用這句

結果跑php artisan migrate發現報錯,才發現好像值該改成localhost才能過

發現好像是我對Sail認識太少,應該用 sail artisan migrate才是

但不知道為什麼Windows上會跑出一個cmd視窗,然後什麼都沒有發生QQ

2023/03/24

[laravel] Windows 10 環境使用Laravel Sail建置遇到Port占用問題

Laravel Sail預設會裝Redis,而Redis的預設Port為6379,就會遇到這行

0.0.0:0: listen tcp 0.0.0.0:6378: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

而以Mac OS寫的文章沒有提到

我找到的原因是這個

【茶包射手日記】ASP.NET Core Kestrel 網站無權繫結錯誤與 Windows 10 Port 限制-黑暗執行緒 (darkthread.net)


將Port改成這以外的Port(例如6396就可以了)

延伸閱讀:

2023/02/10

[laravel][Windows env]composer 安裝套件時失敗

 "The zip extension and unzip/7z commands are both missing, skipping" in Windows during composer install laravel - Stack Overflow

我在看網路上的教學文章提及laravel sail是個好東西,所以我嘗試安裝好laravel之後在專案中下載

結果看到一堆錯誤

打了這個指令

composer require laravel/sail --dev

出現很多


- Syncing sebastian/complexity (2.0.2) into cache

    Failed to download sebastian/code-unit-reverse-lookup from dist: The zip extension and 

unzip/7z commands are both missing, skipping.

The php.ini used by your command-line PHP is: C:\php-8.2.2-Win32-vs16-x64\php.ini

    Now trying to download from source

其他的解法清一色是linux的解法,windows就沒有apt-get


stackoverflow裏頭提及解法是將php.ini的一行

extension=zip

將註解給取消即可









2022/12/17

[Google Cloud] gcloud builds submit 忽略了我的金鑰檔案

 Google Cloud Build 教學 (一) — 透過本地端完成 GCP Cloud Build 服務 | by 楊承翰 | Medium

gcloud builds submit  |  Google Cloud CLI Documentation

選擇本地打包放上去CONTAINER REGISTRY才丟到Cloud Run的原因就是因為我沒搞定金鑰如何放在環境變數裡,

問題來了,為什麼我需要使用這個金鑰呢?好像是因為我需要在imager裡用到google cloud?

好問題,我還是先去背誦義務役都要背的單戰好了

解決方式:

多寫一個 .gcloudignore 讓我的金鑰檔案不被忽略而沒有打包進build裡

找到的問題點:

打包部署時遇到下列說明(奇怪為什麼之前沒這個問題)

Creating temporary tarball archive of 7 file(s) totalling 24.0 KiB before compression.

Some files were not included in the source upload.

文檔中有寫清楚,如果打包時檔案沒有 .gcloudignore,就會使用 .gitignore 作為打包時處理要忽略的檔案

[SOURCE]
The location of the source to build. The location can be a directory on a local disk or a gzipped archive file (.tar.gz) in Google Cloud Storage. If the source is a local directory, this command skips the files specified in the --ignore-file. If --ignore-file is not specified, use.gcloudignore file. If a .gcloudignore file is absent and a .gitignore file is present in the local source directory, gcloud will use a generated Git-compatible .gcloudignore file that respects your .gitignored files. The global .gitignore is not respected. For more information on .gcloudignore, see gcloud topic gcloudignore.

2022/11/09

[Python]踩坑Pitfall configparser.NoSectionError: No section:

python 读取配置文件总是报错 configparser.NoSectionError: No section:

存環境變數的時候,就照著這篇文章的建議

使用.txt作為副檔名,使用.ini作為副檔名會讀取不到

Using .txt as filename extension because using .ini could not read configuration file

花了三小時才找到的坑QQ

jiamingla/LINE-Notify-youtube-video-notify (github.com)

後來想想造成這個問題可能的原因:

本地未打包、打包後都能讀取到 config.ini,部署上 Cloud Run 就讀取不到,我想是 Cloud Run 有保留 config.ini 作為其他用途吧