Skip to content

Instantly share code, notes, and snippets.

View jinlxz's full-sized avatar

Owen.Liu jinlxz

View GitHub Profile
@jinlxz
jinlxz / jenkins-create-node.sh
Created January 28, 2021 02:14 — forked from sergeyhush/jenkins-create-node.sh
Jenkins create new node
#!/bin/bash
JENKINS_URL=$1
NODE_NAME=$2
NODE_SLAVE_HOME='/home/build/slave'
EXECUTORS=1
SSH_PORT=22
CRED_ID=$3
LABELS=build
USERID=${USER}
@jinlxz
jinlxz / .vimrc
Created October 23, 2020 01:54 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@jinlxz
jinlxz / jenkins_email-ext-plugin_html-custom.jelly
Created May 14, 2020 07:57 — forked from nightspotlight/jenkins_email-ext-plugin_html-custom.jelly
Jelly template to display table with JUnit test results for Jenkins Email-ext plugin
<?jelly escape-by-default='true'?>
<!DOCTYPE html [
<!ENTITY nbsp "&#38;#38;nbsp&#59;">
]>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<body>
<!-- GENERAL INFO -->
<table>
<tr>
<td align="right">
@jinlxz
jinlxz / openssl_commands.md
Last active November 8, 2019 03:18 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@jinlxz
jinlxz / config
Created August 26, 2019 02:28 — forked from terrywang/config
~/.ssh/config behind firewall (ssh via HTTP proxy) and faster session creation by reusing already established connection
# User ssh configuration file ~/.ssh/config
# Gist https://gist.github.com/terrywang/3997931
# man ssh_config for more information
# Inspired by the blog post below to fight the NSA
# https://stribika.github.io/2015/01/04/secure-secure-shell.html
# Outside of the firewall, with HTTPS proxy
# Package connect-proxy is required.
# Amazon EC2
@jinlxz
jinlxz / install_jenkins_plugin.sh
Created June 6, 2019 03:07 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@jinlxz
jinlxz / CookieStore.java
Created April 22, 2019 06:59 — forked from twiceyuan/CookieStore.java
Handle Cookies easily with Retrofit/OkHttp
import android.content.Context;
import android.content.SharedPreferences;
import com.example.app.App
import java.util.HashSet;
import java.util.Set;
/**
* Created by twiceYuan on 01/12/2016.
@jinlxz
jinlxz / debug-jenkins-email-ext-plugins.groovy
Last active March 25, 2019 02:09 — forked from francoisledroff/debug-jenkins-email-ext-plugins.groovy
a groovy script to test your email extension templates cf. https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+pluginto do that just * replace the projectName and p.recipientList values in the script below* run this script through http://localhost:8080/jenkins/script ** copy and paste it** click "run"
import hudson.model.StreamBuildListener
import hudson.plugins.emailext.ExtendedEmailPublisher
import java.io.ByteArrayOutputStream
def projectName = "your-project-name-here"
def oriProject=Jenkins.instance.getItem(projectName)
if(oriProject==null){
println "oriProject is null, exit."
return 1
}