Skip to content

Instantly share code, notes, and snippets.

Rafael M. Pestano rmpestano

Block or report user

Report or block rmpestano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rmpestano
rmpestano / cleanWS.md
Last active Jul 18, 2019
Cleans jenkins job workspace via groovy script
View cleanWS.md

Script below must be executed in jenkinsURL/script by an admin user

Job item = Jenkins.instance.getItemByFullName("JOB_NAME")
          
for (Node node in Jenkins.instance.nodes) {
  // Make sure slave is online
  if (!node.toComputer().online) {
    continue
  } 
View gist:447132f6cc197babeae284dfce8fc6e3
2019-06-24 18:53:07,191 localhost quarkus-myfaces-showcase-1.0-SNAPSHOT-runner[18596] INFO [io.quarkus] (main) Quarkus 0.17.0 started in 0.006s. Listening on: http://0.0.0.0:8080
2019-06-24 18:53:07,191 localhost quarkus-myfaces-showcase-1.0-SNAPSHOT-runner[18596] INFO [io.quarkus] (main) Installed features: [cdi, myfaces, undertow-websockets]
2019-06-24 18:53:11,790 localhost quarkus-myfaces-showcase-1.0-SNAPSHOT-runner[18596] INFO [jav.fac.FactoryFinder] (executor-thread-1) getClassLoader - 2
2019-06-24 18:53:11,790 localhost quarkus-myfaces-showcase-1.0-SNAPSHOT-runner[18596] INFO [jav.fac.FactoryFinder] (executor-thread-1) registeredFactoryNames: {java.lang.ClassLoader@2d1df30={javax.faces.context.ExternalContextFactory=[org.apache.myfaces.context.ExternalContextFactoryImpl], javax.faces.context.PartialViewContextFactory=[org.apache.myfaces.context.PartialViewContextFactoryImpl, org.primefaces.context.PrimePartialViewContextFactory], javax.faces.flow.FlowHandlerFactory=[org.apache.myfaces.flow.FlowHan
View registeredFactoryNames.adoc

12:59:28,237 INFO [jav.fac.FactoryFinder] registeredFactoryNames: {com.oracle.svm.hosted.NativeImageClassLoader@71086f27={javax.faces.context.ExternalContextFactory=[org.apache.myfaces.context.ExternalContextFactoryImpl], javax.faces.context.PartialViewContextFactory=[org.apache.myfaces.context.PartialViewContextFactoryImpl, org.primefaces.context.PrimePartialViewContextFactory], javax.faces.flow.FlowHandlerFactory=[org.apache.myfaces.flow.FlowHandlerFactoryImpl], javax.faces.render.RenderKitFactory=[org.apache.myfaces.renderkit.RenderKitFactoryImpl], javax.faces.view.ViewDeclarationLanguageFactory=[org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl], javax.faces.context.FlashFactory=[org.apache.myfaces.context.servlet.ServletFlashFactoryImpl], javax.faces.context.FacesContextFactory=[org.apache.myfaces.context.FacesContextFactoryImpl, org.primefaces.context.PrimeFacesContextFactory], javax.faces.component.visit.VisitContextFactory=[org.apache.myfaces.component.visit.VisitContextFactoryImpl], javax.f

@rmpestano
rmpestano / out.adoc
Last active Jun 21, 2019
Quarkus native build and execution log output
View out.adoc
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on OpenJDK 64-Bit Server VM
[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] docker run -v /home/rafael-pestano/projetos/quarkus-myfaces-native/quarkus-myfaces/quarkus-myfaces-showcase/target:/project:z --rm --user 74086768:560800513 quay.io/quarkus/centos-quarkus-native-image:graalvm-1.0.0-rc16 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar quarkus-myfaces-showcase-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+PrintAnalysisCallTree -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-SpawnIsolates -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace
WARNING: Error loading config file: /home/rafael-pestano/.docker/config.json: open /home/rafael-pestano/.docker/config.json: permission
@rmpestano
rmpestano / Jenkinsfile.adoc
Last active Apr 23, 2019
Java maven jenkinsfile
View Jenkinsfile.adoc
pipeline {
    agent any
    tools {
        maven 'apache-maven-3.3.9'
        jdk 'jdk1.8'
    }
    stages {
        stage('Build') {
            steps {
View remove accents.adoc
private String removeAccents(String str) {
        return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
    }
View gist:8ca08cc5c99c0016fe1bb330e461d6b7
kubectl patch deployment cdi-crud -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
View install-minikube.sh
#!/bin/sh
sudo curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& sudo chmod +x minikube && sudo cp minikube /usr/local/bin && rm minikube && minikube version
@rmpestano
rmpestano / gist:1373c09242778926b4e5384e986696fd
Created Jan 7, 2019
Configure Docker on ubuntu under corporate proxy
View gist:1373c09242778926b4e5384e986696fd
== Install
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --keyserver-options http-proxy=localhost:3128 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-get install docker-ce
== Proxy config
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo gedit /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
@rmpestano
rmpestano / jenkinsfile.adoc
Last active Nov 12, 2018
input+when condition in a declarative pipeline
View jenkinsfile.adoc
pipeline {
    agent none

    //other stages

    stage("Stage ok") {
        agent any
           when {
	      expression {
You can’t perform that action at this time.