Skip to content

Instantly share code, notes, and snippets.

View pgmillon's full-sized avatar

Pierre-Gildas MILLON pgmillon

View GitHub Profile
@pgmillon
pgmillon / fix.py
Created July 3, 2017 10:38
MP version fix script
#!/usr/bin/env python
import ConfigParser
defaults = {'other_versions': None, 'prepared': 'False', 'performed': 'False', 'branched': 'False',
"profiles": '', "auto_increment_policy": "auto_patch"}
release_ini = ConfigParser.SafeConfigParser(defaults=defaults)
mp_config = ConfigParser.SafeConfigParser()
@pgmillon
pgmillon / command.sh
Created July 11, 2015 21:42
Ansible trouble
ansible-playbook -i hosts test.yml -u ubuntu -v
@pgmillon
pgmillon / App.java
Last active July 22, 2019 15:01
Nexus password recovery
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.sonatype.security.ldap.realms.persist.PasswordHelper;
import org.sonatype.security.ldap.upgrade.cipher.DefaultPlexusCipher;
import org.sonatype.security.ldap.upgrade.cipher.PlexusCipher;
import org.sonatype.security.ldap.upgrade.cipher.PlexusCipherException;
import java.security.Security;
/**
* @author Pierre-Gildas MILLON <pg.millon@gmail.com>
@pgmillon
pgmillon / distro
Last active March 23, 2019 07:59
Observium distro script
#!/bin/sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`
if [ "${OS}" = "SunOS" ] ; then
OS=Solaris
ARCH=`uname -p`
@pgmillon
pgmillon / gist:4af87fe3d4f966a7da3a
Created December 3, 2014 15:14
Add Jenkins postStep
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
import hudson.plugins.parameterizedtrigger.*;
Predicate<AbstractProject> featureProjectPredicate = new Predicate<AbstractProject>() {
@Override
public boolean apply(AbstractProject abstractProject) {
return abstractProject.name ==~ /^Feature_.*/;
}
}
@pgmillon
pgmillon / preseed.cfg
Created August 7, 2012 12:22
Preseed file
### Localization
d-i debian-installer/locale string fr_FR
# If you have a slow dhcp server and the installer times out waiting for
# it, this might be useful.
d-i netcfg/dhcp_timeout string 60
### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true