Skip to content

Instantly share code, notes, and snippets.

Avatar

Sylvain Leroy sleroy

View GitHub Profile
@sleroy
sleroy / isFrenchPhoneNumber.js
Created Jul 22, 2020
Ponicode generated test
View isFrenchPhoneNumber.js
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 Jul 22, 2020
Code example for Ponicode
View example.js
function addition(operandA, operandB) {
return operandA + operandB;
}
function fullName(firstName, lastName) {
return firstName + " " + lastName;
}
function isFrenchPhoneNumber(phoneNumber) {
return phoneNumber.startsWith("+33");
View CodeChallenge.java
package ch.salt.code.challenge;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@sleroy
sleroy / jenkins-is-dead.md
Created Jan 20, 2020 — forked from michaellihs/jenkins-is-dead.md
Jenkins is dead - long live Jenkins!
View jenkins-is-dead.md

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
@sleroy
sleroy / HttpServletRequestDebug.java
Created May 15, 2017
How to debug an HttpServletRequest ,Servlet API 3.0
View HttpServletRequestDebug.java
/*
* 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
View video.html
<!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 Oct 28, 2018
maven + gcloud + docker image
View Dockerfile
# 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 Oct 26, 2017
Generating Docker with Gradle, the easy and ugly way....
View gist:d5931075ea7cbe350aee32af156a6bbf
buildscript {
repositories {
mavenLocal()
mavenCentral()
repositories { jcenter() }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
@sleroy
sleroy / templates.xml
Created Nov 10, 2015
My Java Code templates for Eclipse
View templates.xml
<?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 / Basic JobDsl Pipeline step1
Created Mar 5, 2015
JobDsl script to build a simple pipeline.
View Basic JobDsl Pipeline step1
// 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'
You can’t perform that action at this time.