(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import os | |
| import re | |
| import click | |
| import sendgrid | |
| import six | |
| from pyconfigstore import ConfigStore | |
| from PyInquirer import (Token, ValidationError, Validator, print_json, prompt, | |
| style_from_dict) | |
| from sendgrid.helpers.mail import * |
| Some Jenkinsfile examples |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /** | |
| * This file provides common stuff to be used in the pipelines. | |
| * It is important to load it after repo checkout is done: see https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#triggering-manual-loading | |
| * | |
| */ | |
| /** | |
| * Dumps some info about the environment. | |
| * @return | |
| */ |
…or create a new repository on the command line
echo "# java8excercise" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/ppuczka/java8excercise.git git push -u origin master
…or push an existing repository from the command line
| { | |
| "liveSassCompile.settings.formats":[ | |
| { | |
| "format": "expanded", | |
| "extensionName": ".css", | |
| "savePath": "/css" | |
| }, | |
| { | |
| "extensionName": ".min.css", | |
| "format": "compressed", |
| <%@page contentType="text/html" pageEncoding="UTF-8"%> | |
| <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Cities</title> | |
| </head> | |
| <body> | |
| <h2>Cities</h2> |
| <%@ taglib prefix="form" | |
| uri="http://www.springframework.org/tags/form" %> |
| package pl.coderslab.hibernate.validator; | |
| import javax.validation.Constraint; | |
| import javax.validation.Payload; | |
| import java.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| @Constraint(validatedBy = IsAdultValidator.class) |
| @Autowired | |
| Validator validator; | |
| @RequestMapping("/validate") | |
| @ResponseBody | |
| public String validateTest() { | |
| Person p2 = new Person(); | |
| Set<ConstraintViolation<Person>> violations = validator.validate(p2); | |
| if (!violations.isEmpty()) { | |
| for (ConstraintViolation<Person> constraintViolation : violations) { | |
| System.out.println(constraintViolation.getPropertyPath() + " " |