Skip to content

Instantly share code, notes, and snippets.

View SalHe's full-sized avatar
🍇
I like grapes...

SalHe Li SalHe

🍇
I like grapes...
View GitHub Profile
@SalHe
SalHe / exhook.py
Last active July 6, 2024 16:24
Python excepthook with support for zipimport
import sys
from types import TracebackType
from termcolor import colored
import os
import zipfile
import math
LINE_LOOKAROUND = 3
SHOW_LOCALS_AT_TOP = True
@SalHe
SalHe / ImportMap.json
Last active October 23, 2022 06:51
D3.js树图tree 组织机构分布图(基于vue)
{
"imports": {
"vue": "https://sfc.vuejs.org/vue.runtime.esm-browser.js",
"d3": "https://cdn.skypack.dev/d3@5",
"vue/server-renderer": "https://sfc.vuejs.org/server-renderer.esm-browser.js"
}
}
@SalHe
SalHe / MdEditorV3存在安全隐患.md
Created December 5, 2021 03:11
MdEditorV3存在安全隐患

MdEditorV3安全隐患

当前的编辑器可能存在被注入JS代码攻击的安全隐患。

可以将本Markdown内容完整的复制到MdEditorV3编辑器中测试。

测试信息

  • 测试版本:v1.7.3
  • 测试时间:2021/12/05
@SalHe
SalHe / pipeline.gdsl
Created May 13, 2021 02:15 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@SalHe
SalHe / docker-compose.jenkins-dind.yml
Created May 8, 2021 14:20 — forked from adelmofilho/docker-compose.jenkins-dind.yml
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at: