Skip to content

Instantly share code, notes, and snippets.

View snallami's full-sized avatar

Suresh Nallamilli snallami

  • Los angeles, CA
View GitHub Profile
@snallami
snallami / ChangePassword.java
Created January 7, 2020 07:25 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
@snallami
snallami / README.md
Created January 31, 2017 21:34 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@snallami
snallami / kill-scm-threads.groovy
Created January 6, 2017 20:27 — forked from andyjones/kill-scm-threads.groovy
Kills long running SCM polling threads in Jenkins
Jenkins.instance.getTrigger("SCMTrigger").getRunners().each()
{
item ->
long millis = Calendar.instance.time.time - item.getStartTime()
if(millis > (1000 * 60 * 60)) // 1000 millis in a second * 60 seconds in a minute * 3 minutes
{
Thread.getAllStackTraces().keySet().each()
{
tItem ->