Skip to content

Instantly share code, notes, and snippets.

View sleroy's full-sized avatar

Sylvain Leroy sleroy

View GitHub Profile
import groovy.transform.ToString
/**
* identité => type
*
* Objet : element à une vie
* => créé ( réification , donner vie, donner substance à un concept abstrait)
* => utilisé
* => détruit
*/
class Utilisateur {
@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)
})
})
@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");
package ch.salt.code.challenge;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@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
<!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 / 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
@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 / HttpServletRequestDebug.java
Created May 15, 2017 15:15
How to debug an HttpServletRequest ,Servlet API 3.0
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@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="