Skip to content

Instantly share code, notes, and snippets.

View sleroy's full-sized avatar

Sylvain Leroy sleroy

View GitHub Profile
@sleroy
sleroy / build.gradle
Last active August 29, 2015 14:07 — forked from devacto/build.gradle
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
// Use Java 8 by default
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '1.0'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
@sleroy
sleroy / Basic JobDsl Pipeline step1
Created March 5, 2015 09:58
JobDsl script to build a simple pipeline.
// Ici nous allons créer les jobs Jenkins associés au pipeline de déploiement
println "Creation of Jenkins Jobs"
/**
Reference documentation
https://github.com/jenkinsci/job-dsl-plugin/wiki/View-Reference
https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands
*/
def project = 'Ehour'
@sleroy
sleroy / templates.xml
Created November 10, 2015 20:27
My Java Code templates for Eclipse
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="javadoc" deleted="false" description="author name" enabled="true" id="org.eclipse.jdt.ui.templates.author" name="@author">@author ${user}</template><template autoinsert="true" context="javadoc" deleted="false" description="&lt;b&gt;&lt;/b&gt;" enabled="true" id="org.eclipse.jdt.ui.templates.b_tag" name="&lt;b&gt;">&lt;b&gt;${word_selection}${}&lt;/b&gt;${cursor}</template><template autoinsert="true" context="javadoc" deleted="false" description="&lt;code&gt;&lt;/code&gt;" enabled="true" id="org.eclipse.jdt.ui.templates.code_tag" name="&lt;code&gt;">&lt;code&gt;${word_selection}${}&lt;/code&gt;${cursor}</template><template autoinsert="true" context="javadoc" deleted="false" description="&lt;i&gt;&lt;/i&gt;" enabled="true" id="org.eclipse.jdt.ui.templates.i_tag" name="&lt;i&gt;">&lt;i&gt;${word_selection}${}&lt;/i&gt;${cursor}</template><template autoinsert="true" context="javadoc" deleted="false" description="
@sleroy
sleroy / gist:d5931075ea7cbe350aee32af156a6bbf
Created October 26, 2017 15:21
Generating Docker with Gradle, the easy and ugly way....
buildscript {
repositories {
mavenLocal()
mavenCentral()
repositories { jcenter() }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
@sleroy
sleroy / Dockerfile
Last active October 28, 2018 22:50
maven + gcloud + docker image
# docker build -t sleroy/byoskill-agent:0.1 .
FROM docker:rc
MAINTAINER sleroy <sleroy0@gmail.com>
# GKE build & testing environment for Circle CI 2.0
USER root
ENV NODEJS_VERSION v8
ENV DOCKER_VERSION rc
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="description" content="What does artificial intelligence mean? How does machine learning work? These are tough questions, but important ones to answer. In The Verge’s Real World AI Issue we’re going to look at how this technology is being used in the world around you — here and now.">
<meta name="author" rel="www.linkedin.com/in/sylvain-leroy-byoskill">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
crossorigin="anonymous">
@sleroy
sleroy / jenkins-is-dead.md
Created January 20, 2020 12:47 — forked from michaellihs/jenkins-is-dead.md
Jenkins is dead - long live Jenkins!

Jenkins is dead - long live Jenkins!

Brainstorming

  • Basic Concepts
    • Continuous Delivery

      Delivering Software with confidence, small increments, frequent releases, requires automated tested, automated deployment, automated infrastructure

  • Pipelines
package ch.salt.code.challenge;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@sleroy
sleroy / example.js
Created July 22, 2020 20:22
Code example for Ponicode
function addition(operandA, operandB) {
return operandA + operandB;
}
function fullName(firstName, lastName) {
return firstName + " " + lastName;
}
function isFrenchPhoneNumber(phoneNumber) {
return phoneNumber.startsWith("+33");
@sleroy
sleroy / isFrenchPhoneNumber.js
Created July 22, 2020 20:52
Ponicode generated test
const rewire = require("rewire")
const example = rewire("./example")
const isFrenchPhoneNumber = example.__get__("isFrenchPhoneNumber")
// @ponicode
describe("isFrenchPhoneNumber", () => {
test("0", () => {
let result = isFrenchPhoneNumber("+33688261221")
expect(result).toBe(true)
})
})