Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
| 1 hostname elliot-01 | |
| 2 echo elliot-01 > /etc/hostname | |
| 3 bash | |
| 4 vim /etc/modules-load.d/k8s.conf | |
| 5 curl -fsSL https://get.docker.com | bash | |
| 6 docker version | |
| 7 docker ps | |
| 8 apt-get update && apt-get install -y apt-transport-https | |
| 9 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
| 10 echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list |
| 'use strict'; | |
| const nodemailer = require('nodemailer'); | |
| // Generate test SMTP service account from ethereal.email | |
| // Only needed if you don't have a real mail account for testing | |
| nodemailer.createTestAccount((err, account) => { | |
| // create reusable transporter object using the default SMTP transport | |
| let transporter = nodemailer.createTransport({ | |
| host: 'smtp.ethereal.email', |
| public class DocumentUtil { | |
| // CPF | |
| private static final int[] WEIGHT_SSN = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2}; | |
| // CNPJ | |
| private static final int[] WEIGHT_TFN = {6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2}; | |
| private static int sum(int[] weight, char[] numbers, int length) { | |
| if (length <= 0) return 0; |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console