原创 Centos setting password for user, but still can‘t log in on it

Refer to : Centos setting password for user, but still can’t log in on it Use another to check the log by with sudo

原创 pam_succeed_if(sshd:auth): requirement “uid 」= 1000“ not met by user “root“

有下面兩種情形: cat /etc/shadow | grep root 查看root用戶是否被鎖定。如果出現 root:!!$6$CG (注意其中的!!)則說明root用戶被鎖定,不能登陸。 解決方案: passwd -u

原创 PHP從週數創建DateTime

參考:How to create datetime from week number $date = (new DateTime())->setISODate($year,$week,$day)->setTime($hour,$m

原创 帶有空格的文件名參數處理。

設置IFS爲\n (IFS=$'\n'; ffmpeg -i $file) 處理文件名爲my video.mp4的視頻文件。 FFmpeg Error ( no such file or directory error) B

原创 使用 SQL 進行排名搜索

參考 Ranked search with SQL 計算term的出現次數。 SELECT SUM(((LENGTH(Body) - LENGTH(REPLACE(Body, 'term', '')))/4)) AS Occu

原创 com.mysql.jdbc.Driver not loaded 或者 com.mariadb.jdbc.Driver not loaded

logstash Error: com.mariadb.jdbc.Driver not loaded Cannot load driver class: com.mysql.jdbc.Driver Spring

原创 git查看函數修改歷史

強烈推薦 Github: git-flight-rules 追蹤一個函數的變更歷史可以使用 I want to view the commit history for a specific function git log -L

原创 對等端的證書有一個無效的簽名。 錯誤代碼:SEC_ERROR_BAD_SIGNATURE

配置 Fiddler 抓取 Https 請求時遇到了這個問題。 cmd 下輸入 certmgr.msc > 操作 > 查找證書,然後輸入 Fiddler 搜索,選中所有搜索出的證書; 清空 C:\Users\Dell\AppDat

原创 elasticsearch 7 批量刪除文檔。

參考 StackOverflow 問題Delete all documents from index/type without deleting type 的 回答 curl -XPOST 'localhost:9200/mate

原创 gitlab 403, 502問題解決方案

GitLab issuing temporary IP bans - 403 forbidden 502 Gitlab is taking too much time to respond

原创 mysql查詢各組最近一條記錄

select * from sc_records where record_id in ( select max(record_id) from sc_records group by user_id order by n

原创 ffmpeg轉換視頻 格式

ffmpeg -i movie.avi -c copy -map 0 output.mp4或 ffmpeg -i movie.avi -c:v libx264 -crf 19 -preset slow -c:a aac -b:a

原创 mysql計算累加和

使用變量來計算累加和 set @csum := 0; select id, count, (@csum := @csum + count) as cumulative_sum from YourTable order by id;

原创 nginx: [emerg] a duplicate default server for

StackOverflow: nginx: [emerg] a duplicate default server for Github: Error: duplicate listen options for [::]:443 #

原创 軟件中的腳手架

Scaffolding generally refers to a quickly set up skeleton for an app. It’s not rails-only since other platforms hav