Skip to content

Instantly share code, notes, and snippets.

@corux
corux / sonar-cleanup.py
Created July 29, 2016 18:07
Script to automate the deletion of old projects from SonarQube.
#!/usr/bin/env python
import argparse,collections,json,shlex,urllib,re
from datetime import datetime
from datetime import timedelta
from dateutil.parser import parse
from termcolor import colored
# Command line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--dry-run", dest="dryrun", action="store_const", const=True, default=False, help="Do not delete SonarQube projects.")
@bric3
bric3 / SSLPoke.java
Created February 10, 2020 07:17
The famous SSLPoke from Atlassian : establish a TLS connection but support http proxy and updated to Java 11
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;