fx - 在命令列檢視 json (command line json viewer) 的開發者工具
在前後端分離架構中,需要頻繁的測試及查看 json ,通常都會透過 postman, insomnia 來輔助開發
這裡要介紹的是在 Command-Line 可直接檢視 json 的套件 fx
Continue ReadingMarketing, SEO, Web trends, Programming tutorial, Web design, and Life event...
在前後端分離架構中,需要頻繁的測試及查看 json ,通常都會透過 postman, insomnia 來輔助開發
這裡要介紹的是在 Command-Line 可直接檢視 json 的套件 fx
Continue ReadingHow to back up GCP Storage file and folder to local?
Here I’m using gsutil tool command line tool to download all file to local.
Continue Reading在開發上傳檔案套件過程,原本測試圖片上傳功能都正常
但是當上傳 pdf, video 時,卻遇到 getMimeType 發生 The file "" does not exist 的錯誤
查詢原因,原來是在 php 原始設定的最大上傳限制設定太低
因此,開啟 php.ini 設定 upload_max_filesize 調整為 10Mb 即可正常上傳
Continue ReadingTig 其實就是將 Git 到過來念的單字,這個工具
他將許多Git的功能,處理成更加直觀及快捷的交互操作
透過 Tig 可以很方便的讓我們直接在 cli 查看 git log, diff, blame…等
這裡將從安裝到一步步介紹用法
Continue Reading更新方式
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Continue Reading
有時在 pull 過程,偶爾都會遇到 Git 發生衝突的狀況
commit your changes or stash them before you can merge.
或者,在我們開發某個新feat功能,需要先處理一些修改再返回繼續開發時,
這時,就可以透過 git stash 暫存指令將目前開發內容暫存起來
先將新增的內容 pull 下來,或等我們狀況處理完畢,再將暫存內容取回
用法如下:
Continue Reading在阿里雲 ECS 默認的安裝環境,看到 安全警示 RHSA-2017:3263: curl security update
阿里雲的 centOS 7.4 預設的 curl 及 libcurl 不是最新版本,存在漏洞問題
修復該漏洞的方式:
Continue Reading當執行 ssh-add 時
ssh-add ~/.ssh/<private_key_file>
如果出現錯誤訊息: Could not open a connection to your authentication agent.
執行進入 ssh bash ,就能正執行 ssh-add
ssh-agent bash
ssh-add ~/.ssh/<private_key_file>
Continue Reading
ssh-keygen -f ~/.ssh/your_custom_name -C "youremail@emailhost.com"
Continue Reading
針對一些需求,要將舊有專案作為基礎來進行重構或者修整,讓新專案可以使用
最簡單的做法就是直接將 .git 刪除,再將所有專案一次加入新的 repository
但是過去專案執行過程所保留的紀錄,在遇到一些問題時,至少還有歷史 commit log 可以參考
保留原本的 git log 在新的 repository 延續使用方式:
查詢目前專案的 remote repository
git remote -v
Continue Reading
r : 讀取 w : 寫入 x : 執行
擁有者(u), 群組(g), 其他使用者(o)
所有使用者(a)
權限數字 | 數值相加 | 權限表示 |
---|---|---|
0 | 0+0+0 | — |
1 | 0+0+1 | –x |
2 | 0+2+0 | -w- |
3 | 0+2+1 | -wx |
4 | 4+0+0 | r– |
5 | 4+0+1 | r-x |
6 | 4+2+0 | rw- |
7 | 4+2+1 | rwx |
檔案型態 | 說明 |
---|---|
d | 目錄 |
- | 檔案 |
l | 連結檔 |
b | 儲存的周邊設備 |
c | 序列設備 |
目錄 777 drwx rwx rwx
檔案 755 -rwx r-x r-x
檔案 644 -rw- r– r–
Continue Reading在Mac安裝新版本 OS 之後,出現了 docker-compose 無法正常 up 的情況
解決方式:
開啟 docker premerence
點選 Reset > Reset to factory default
接著需要重新登入 Docker
再次啟動之後,再透過 up 重新載入 images ,完成啟動
完成
Continue Reading最近Mac升級了 OS 之後
git 使用時會出現錯誤訊息
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
解決方法:
xcode-select --install
問題應該就會解決
如果還是不行,可以試試
sudo xcode-select -switch /
Continue Reading
yum install epel-release –y
yum clean all
yum list
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
確認移除
docker info
安裝必要的 repository
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
使用 stable repository
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
啟用 edge (可自行決定是否啟用)
sudo yum-config-manager --enable docker-ce-edge
(若不想啟用 edge,也可以直接關閉):
sudo yum-config-manager --disable docker-ce-edge
安裝新版本
sudo yum install docker-ce
docker info
sudo systemctl start docker #運行Docker守護進程
sudo systemctl stop docker #停止Docker守護進程
sudo systemctl restart docker #重啟Docker守護進程
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
添加權限
Continue ReadingLaravel Telescope 是一個全面監控的 debug 助理,是由 Laravel 開發團隊所推出的一項功能,支援 Laravel 5.7.7 以上的版本。
其中包括以下的項目都包含在 watcher :
Continue Reading跨域驗證本身存在著許多風險,其中最知名的中間人攻擊Man-in-the-middle attack (MitM attacks),透過劫持 wifi 傳輸過程中所訪問的router ,解析其中的憑證,就能來偽裝用戶進行登入。
若採用 SSL及可防止網路請求被攔截,
針對單一單入即可在不同 Domain 做跨域驗證的做法,最知名的就是 Single sign on (sso)
Continue Reading在主網域的 DNS A-record ( 如果用 IPv6 則設定 AAAA-record ) 指向到另一個網域的IP
注意,DNS 只能指向 IP ,無法指向該IP的子資料夾
當主 DNS point 到另一個子網域後,另一個子網域本身應該要 point 到一台主機
則需要在這一台主機進行設定 Virtual hosting
來對於子網域的 redirect/equate 指向子資料夾的部分,
例如,由 subdoname.A.com 請求過來時,會透過這個方式: ${DocumentRoot of B.com}/folder ,會提供 folder 內容
Continue Reading