Skip to content

Instantly share code, notes, and snippets.

@CptPlastic
CptPlastic / cleanupJenkinsWorkspaces.groovy
Created Dec 28, 2020 — forked from EvilBeaver/cleanupJenkinsWorkspaces.groovy
A jenkins script to clean up workspaces on slaves
View cleanupJenkinsWorkspaces.groovy
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
View keybase
### Keybase proof
I hereby claim:
* I am cptplastic on github.
* I am cptplastic (https://keybase.io/cptplastic) on keybase.
* I have a public key ASB8cuSZzE2g8gJOVQxIZBO3ecSDYxd6pknD75Bgmyg0Wwo
To claim this, I am signing this object:
@CptPlastic
CptPlastic / java_install.sh
Created Oct 3, 2018 — forked from rjurney/java_install.sh
How to automagically install Oracle JDK 1.8 on CentOS
View java_install.sh
# Install Java 1.8 in CentOS/RHEL 6.X
sudo yum remove -y java-1.6.0-openjdk
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \
-O jdk-8-linux-x64.rpm
sudo rpm -Uvh jdk-8-linux-x64.rpm
sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0/jre/bin/java 20000
sudo alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0/bin/jar 20000
View Apache Tomcat 8 Start stop script init.d script
#!/bin/bash
# chkconfig: 2345 95 20
# description: This application was developed by me and is tested on this server
# processname: my_app
#
# Tomcat 8 start/stop/status init.d script
# Initially forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash@miglen.com>
#
# Release updates: