紀錄工作上的點點滴滴

一到指令刪除相關進程
2024-04-27 linux
查詢 java 所有的進程 ❯ top -b -n 1 | grep java | cut -c 1-7 8190 15263 15512 16641 17148 假設我要刪除 java 全部的進程可以這樣處理 ❯ top -b -n 1 | grep java | cut -c 1-7 | ... Read More
CLI 檢查網站憑證
2024-04-26 工作雜記 linux
curl curl https://www.google.com -v -k 2>&1 | grep -E "Connected to|subject|expire" 執行結果 ❯ curl https://www.google.com -v -k ... Read More
linux 資料基礎分析
2024-04-25 工作雜記 linux 資料分析
grep: 過濾資料 grep 要過濾出的資料 exampleFileSource.log > exampleFile.log cut 切除每行前 60 個字元 cut -b 60- exampleFile.log > exampleFile.2.log sort: 類似 sql ... Read More
grails5 hibernate 建立監聽事件研究
2024-04-16 grails java grails
注入: conf/spring/resources.groovy package spring import work.pollochang.pollo.grails.db.aop.CustomInterceptor // Place your Spring DSL code here beans ... Read More
grails 攔截器
2024-04-16 grails java grails
Interceptor 介面: org.hibernate.Interceptor 介面允許您在 Hibernate 事件的各個階段介入,並提供了一些方法來實現您自己的邏輯。EmptyInterceptor 是 Interceptor 介面的一個簡單實現,它包含了所有方法的空實現。 ... Read More
程式進化史
2024-04-16 工作雜記 groovy CyclomaticComplexity
筆記一下這些年我寫的糞 code 的優化流程 一開始寫的 被檢測為 CyclomaticComplexity 。程式如下: package work.pollochang.twgcb import grails.gorm.transactions.Transactional import ... Read More
annotation 與 AOP
2024-04-13 工作雜記 java AOP
範例程式完整專案: Java 基本內置 annotation @Override 重寫父層的方法 @Deprecated 表示該方法再為雷會被棄用 @SuppressWarnings 主要的用處就是忽略警告信息 規定 annotation 可以放在哪裡 類別 ElementType.TYPE : 能 ... Read More
KDE 桌面 CLI
2024-04-09 linux KDE
KED 強制登出使用者 sudo pkill -KILL -u [username]] 是直接強制踢出指定使用者所有程序 Read More
Mozilla Public License Version 2.0 中英文對照
2024-04-08 工作雜記 License
英文原文 MOZILLA PUBLIC LICENSE Version 2.0 1. Definitions 1.1. “Contributor” means each individual or legal entity that creates, contributes to the ... Read More
TWGCB 資料庫建立腳本
2024-04-06 TWGCB TWGCB 資安
最近在整理 GCB 的相關資料,想說把它匯入資料庫後,未來會比較好管理導入的主機 資料庫環境 OS: Debian 12 DB: postgresql 資料庫 schema 進入資料庫 sudo su - postgres psql 建立資料庫 create database twgcb_db; ... Read More