Skip to content

Instantly share code, notes, and snippets.

View basilevs's full-sized avatar

Vasili Gulevich basilevs

View GitHub Profile
@basilevs
basilevs / hide_pipeline_success.user.js
Last active October 20, 2024 17:11
Hide successful Jenkins Pipeline steps
// ==UserScript==
// @name Hide successful pipeline steps
// @version 5
// @grant GM.setValue
// @grant GM.getValue
// @match https://jenkins-itest.spirenteng.com/jenkins*/job/*/flowGraphTable/
// @match https://ci.eclipse.org/*/job/*/flowGraphTable/
// ==/UserScript==
@basilevs
basilevs / Jenkinsfile
Last active October 11, 2024 09:58
Minimal declarative Jenkins pipeline definition
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '2', daysToKeepStr: '7', removeLastBuild: true))
}
stages {
stage("test") {
steps {
echo "q"
@basilevs
basilevs / jenkins-autologin.user.js
Created October 23, 2024 10:27
Jenkins auto-login
// ==UserScript==
// @name Jenkins auto-login
// @version 1
// @match https://jenkins-itest.spirenteng.com/jenkins/*
// @match https://ci.eclipse.org/*
// @grant none
// ==/UserScript==
function findSingleNode(query) {
const buttons = document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE);
final Display display = Display.getDefault();
final Image captureImage = new Image(display, display.getBounds().width, display.getBounds().height);
GC gc = new GC(display);
gc.copyArea(captureImage, display.getBounds().x, display.getBounds().y);
gc.dispose();
Imagewriter.write(...)
package org.basilevs.example.flush;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
@basilevs
basilevs / CharacterSkippingReader.java
Created April 23, 2025 12:37
Untested java.io.Reader decorator that filters out a set of characters
/*******************************************************************************
* Copyright (c) 2025 Xored Software Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
@basilevs
basilevs / LeakDetector.java
Created April 25, 2025 17:22
A helper class to detect unclosed resources that were garbage collected
/*******************************************************************************
* Copyright (c) 2025 Xored Software Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
@basilevs
basilevs / trust.sh
Created December 3, 2025 17:12
Add trusted certificate chain to Java default sotrage
sudo /Library/Java/JavaVirtualMachines/temurin-23.jdk/Contents/Home/bin/keytool -importcert -file /private/tmp/boreas-dept07-chain.pem -cacerts -alias kenobi