Skip to content

Instantly share code, notes, and snippets.

View lineuve's full-sized avatar

Villeneuve Figueiredo lineuve

View GitHub Profile
@lineuve
lineuve / Configuration.h
Created December 5, 2015 06:24 — forked from wgbartley/Configuration.h
Configuration.h for my Prusa i3
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// This configuration file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//===========================================================================
//============================= DELTA Printer ===============================
//===========================================================================
@lineuve
lineuve / schema.sql
Created August 25, 2018 14:55 — forked from brexis/schema.sql
Radius Mysql schema.sql
###########################################################################
# db_mysql.sql rlm_sql - FreeRADIUS SQL Module #
# #
# Database schema for MySQL rlm_sql module #
# #
# To load: #
# mysql -uroot -prootpass radius < db_mysql.sql #
# #
# Mike Machado <mike@innercite.com> #
###########################################################################
@lineuve
lineuve / docker-builder.sh
Created September 8, 2019 13:06 — forked from didip/docker-builder.sh
Small helper script that automates Docker building and pushing
#!/bin/bash
set -ex
PARENT_DIR=$(basename "${PWD%/*}")
CURRENT_DIR="${PWD##*/}"
IMAGE_NAME="$PARENT_DIR/$CURRENT_DIR"
TAG="${1}"
REGISTRY="hub.docker.com"
@lineuve
lineuve / Jenkinsfile
Created September 8, 2019 14:03 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@lineuve
lineuve / docker-clean.sh
Created September 26, 2019 17:54 — forked from mugifly/docker-clean.sh
Cleanup Script for Docker Images and Containers
#!/bin/sh
echo -e "-- Removing exited containers --\n"
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes
echo -e "\n\n-- Removing untagged images --\n"
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }')
echo -e "\n\n-- Removing volume directories --\n"
docker volume rm $(docker volume ls --quiet --filter="dangling=true")
@lineuve
lineuve / bitbucket-branches-job-dsl.groovy
Created October 3, 2019 18:15 — forked from mgrebenets/bitbucket-branches-job-dsl.groovy
Jenkins Job DSL Example - Bitbucket Branches
//
// Jenkins Job DSL example to create build projects for Bitbucket branches
//
// Imports
import java.text.DateFormat
import java.text.SimpleDateFormat
import groovy.time.TimeCategory
// URL components
@lineuve
lineuve / bitbucket_project.groovy
Created October 3, 2019 18:16 — forked from navidurrahman/bitbucket_project.groovy
Jenkins Job DSL Example - Bitbucket project and branches
// URL components
String baseUrl = "https://bitbucket.org/rest/api"
String version = "1.0"
String project = "SYS"
// Put it all together
String reposUrl = [baseUrl, version, "projects", project, "repos"].join("/")
def send_request(url_string){
// Create URL
@lineuve
lineuve / README.md
Created October 8, 2019 20:45 — forked from mllrjb/README.md
Jenkins init.groovy.d role-based authorization strategy

Usage

Set a system environment variable AUTHZ_JSON_URL that points to a JSON file with the following structure:

{
  "admins": [
    "groupA", 
    "userA"
 ],
@lineuve
lineuve / replaceInFile.groovy
Created October 12, 2019 04:22 — forked from tamirko/replaceInFile.groovy
replace string in a file in groovy example
/* Groovy Usage:
The following example replaces:
the 1st occurrence of "James" in data.txt with "user1",
the 2nd occurrence of "James" in data.txt with "user2",
the 3rd occurrence of "James" in data.txt with "user3",
..
the 9th occurrence of "James" in data.txt with "user9".
*/
def myFile = new File("data.txt")
@lineuve
lineuve / Jenkinsfile
Created October 23, 2019 15:26 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with 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, stage timeouts, stage c…
#!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-alpine