Skip to content

Instantly share code, notes, and snippets.

View boly38's full-sized avatar

Vandeputte Brice boly38

View GitHub Profile
@boly38
boly38 / getCertificate.sh
Created October 20, 2017 11:27
quennec.fr/trucs-astuces getCertificate.sh
#!/bin/sh
# source d'origine: src: https://www.quennec.fr/trucs-astuces/syst%C3%A8mes/gnulinux/commandes/openssl/openssl-r%C3%A9cup%C3%A9rer-un-certificat-distant
# améliorations:
# - quitter après 2 secondes
# - report du stdout
HOST=$1
PORT=${2:-443}
openssl s_client -connect ${HOST}:${PORT} > .workout &
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.conn.SchemePortResolver;
import org.apache.http.impl.conn.DefaultRoutePlanner;
import org.apache.http.protocol.HttpContext;
import org.slf4j.LoggerFactory;
/**
* ***[recommended]**** Use System default planner like this :
@boly38
boly38 / Code.gs
Created July 30, 2015 12:06
Google appscript to delete mail older thant N days and having a given label
function deleteOldMailFromTag() {
// push this function onto https://script.google.com/
// to make a dry run, set sendReport to true, and removeMail to false.
//
// common config
var sendReport = true; // send script execution log by email
var removeMail = false; // set it to true only after strong tests :)
var tag = 'myLabel';
var minAge = '30d';
Manifest-Version: 1.0
Created-By: Brice (by hand)
Build-Jdk: 1.4.2_19
Specification-Title: XStream Core and Jettison
Specification-Vendor: XStream Jettison
Implementation-Title: XStream Core
Implementation-Version: 1.4.2
Implementation-Vendor-Id: com.thoughtworks.xstream
Implementation-Vendor: XStream
Specification-Version: 1.4
@boly38
boly38 / Readme.md
Last active December 27, 2015 11:09
a maven profile called "stats" used to log some maven lifecycle steps

"stats" maven profile

this profile simply append step datetime in a file called stats.log

Installation

  • add stats profile to your pom.xml