Skip to content

Instantly share code, notes, and snippets.

View secf4ult's full-sized avatar

Yu Xiao secf4ult

View GitHub Profile
@secf4ult
secf4ult / arrow-pointer.svg
Last active January 7, 2023 07:53
arrow-pointer svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# jenkins
docker run -d -p 8081:8080 \
-p 50000:50000 \
--name jenkins \
-v jenkins-vol:/var/jenkins_home \
jenkins/jenkins:lts
pipeline {
agent any
parameters {
string(name: "myStringParam", description: "String Parameter")
choice(choices: ["Choice 1", "Choice 2"], name: "myChoiceParam", description: "Choice Parameter")
booleanParam(defaultValue: false, name: "myBooleanParam", description: "Boolean Parameter")
}
environment {
@secf4ult
secf4ult / Oracle.sql
Last active June 21, 2024 03:20
SQL cheatsheet
-- Get the execution plan for the last command
SELECT * FROM dbms_xplan.display_cursor();
-- Get the hinted plan for the last command
SELECT * FROM dbms_xplan.display_cursor(format=>'+outline'));
@secf4ult
secf4ult / settings.json
Created October 22, 2025 02:33
CSpell settings for common lib names
{
"cSpell.userWords": [
"awssdk",
"jacoco",
"jasperreports",
"javadocs",
"javax",
"jaxb",
"jdbc",
"lmax",
@secf4ult
secf4ult / pre-commit
Created October 24, 2025 05:48
Git hooks
#!/usr/bin/bash
properties=$(git diff --cached --name-only | grep -E '.*\.properties')
# make git hook can read user input
exec < /dev/tty
if [[ -n "$properties" ]];then
while IFS= read -r f;do
printf ' - %s\n' "$f"
done <<< "$properties"
echo