Skip to content

Instantly share code, notes, and snippets.

View fdrouet's full-sized avatar

Frédéric DROUET fdrouet

  • Bordeaux, France
View GitHub Profile
@vivekkr12
vivekkr12 / BouncyCastleCertificateGenerator.java
Last active June 7, 2024 08:34
Generate root X509Certificate, Sign a Certificate from the root certificate by generating a CSR (Certificate Signing Request) and save the certificates to a keystore using BouncyCastle 1.5x
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.BasicConstraints;
import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.asn1.x509.GeneralName;
import org.bouncycastle.asn1.x509.KeyUsage;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
@teknologist
teknologist / docker-compose.yml
Last active August 29, 2015 14:22
eXo platform using mysql with docker compose
exodata:
restart: on-failure:5
image: teknologist/exo-data
mysqldata:
restart: on-failure:5
image: teknologist/mysql-docker-data
mysql:
restart: on-failure:5
image: mysql/mysql-server:latest
environment:
@hgomez
hgomez / mint141516.md
Last active October 23, 2018 14:08
Mint 14 -> Mint 15 -> Mint 16

Mint upgrade procedures

Some investigation and tests on how to upgrade Mint machine.

Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.

As usual you could break your machine, so please do backups before and cross fingers.

Mint 14 -> Mint 15

@aheritier
aheritier / setMaven.sh
Created May 29, 2013 08:03
Script to switch between various Maven versions (One day perhaps we may have a renv, jenv, like ...) Works on MacOs Put your Maven installations under $MVN_VERSIONS_DIRECTORY
#!/bin/bash
MVN_VERSIONS_DIRECTORY="/Users/arnaud/Applications/"
MVN_DIRECTORY_TEMPLATE="apache-maven-"
versions=`ls -1 ${MVN_VERSIONS_DIRECTORY} | grep ${MVN_DIRECTORY_TEMPLATE}'[2-9].[0-9]' | sed 's/^.*maven-//g'`
echo -e "\033[1;32mAvailable Versions:\033[0m " $versions
if [ "$1" == "" ]; then
exit
fi
@srpouyet
srpouyet / mongodb
Created February 29, 2012 17:14
Mongodb logrotate on Ubuntu
# Put this in /etc/logrotate.d/mongodb
# http://stackoverflow.com/questions/5004626/mongodb-log-file-growth
/var/log/mongo/*.log {
daily
rotate 30
compress
dateext
missingok
notifempty