Skip to content

Instantly share code, notes, and snippets.

@misterbrownlee
misterbrownlee / jenkins-notes.md
Created September 12, 2012 18:10
Jenkins setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

@benjchristensen
benjchristensen / FuturesA.java
Last active November 13, 2022 18:34
FuturesA.java Simple example of using Futures.
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class FuturesA {
public static void run() throws Exception {
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active June 11, 2024 13:23
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@adrienjoly
adrienjoly / devenir-cto.md
Last active February 28, 2021 07:49
Devenir CTO d'une startup: éviter les problèmes de débutants

Devenir CTO d'une startup: éviter les problèmes de débutants

Présenté le 21/04/2015 par Adrien Joly à Epitech Innovation Hub

Résumé

Après 4 ans comme lead developer dans une startup web parisienne, Adrien Joly vient partager un retour d'expérience de cette aventure, et des conseils pratiques sur: comment reconnaitre un bon associé d'un incompétent, comment éviter de développer un service voué à l'échec, comment obtenir la confiance de son associé pour les choix technologiques et les délais de développement. Il cherche des étudiants bons en développement web et/ou mobile, pour les présenter à des CEOs sérieux, et les accompagner dans les 1ères étapes du développement d'une startup.

Introduction

@eliotsykes
eliotsykes / git-aware-bash-prompt.md
Last active June 2, 2024 02:26
Git Aware Bash Prompt
@jonico
jonico / Jenkinsfile
Last active October 4, 2024 18:44
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
package com.example.iznenad;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.data.mapping.context.PersistentEntities;
import org.springframework.data.projection.SpelAwareProxyProjectionFactory;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.core.projection.ProjectionDefinitions;
import org.springframework.data.rest.core.support.SelfLinkProvider;
import org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler;
@paulchubatyy
paulchubatyy / pipeline.groovy
Last active March 11, 2022 14:38
Jenkins pipeline to read the repository list for Github Organization and create multibranch pipeline projects for them
import org.kohsuke.github.*
/*
* This pipeline uses the Jenkins Job DSL plugin to create the multi-branch pipelines
* for your Github Organization repositories.
*
* @see https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin
*
* It does not consumes 5k requests in 6 minutes, but actually queries the Github API
* for the repositories in organization and creates the Multi-Branch Pipelines in Jenkins.
@merikan
merikan / Jenkinsfile
Last active October 31, 2024 10:20
Some Jenkinsfile examples
Some Jenkinsfile examples
@ysbaddaden
ysbaddaden / jwt
Created June 19, 2019 14:42
WINDEV: create JWT with HS256 signature
// Crée un JSON Web Token pour l'extranet, signé via HMAC SHA 256, permettant
// d'identifier le CaC sur l'extranet comme utilisateur ayant accès à toutes les
// données.
PROCÉDURE CréerTokenExtranet()
// header du token (algorithm, type) :
taHeader est un tableau associatif de chaînes
taHeader["alg"] = "HS256"
taHeader["typ"] = "JWT"