Skip to content

Instantly share code, notes, and snippets.

Marco Davalos marco2704

Block or report user

Report or block marco2704

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marco2704
marco2704 / builds_cleaner.groovy
Last active Sep 17, 2019
Delete old builds from all configured Jobs in Jenkins, in a selective way.
View builds_cleaner.groovy
import jenkins.model.Jenkins
import hudson.model.Job
int MAX_BUILDS_TO_KEEP = 5
Jenkins.instance.getAllItems(Job.class).each { job ->
job.builds.drop(MAX_BUILDS_TO_KEEP).findAll {
@marco2704
marco2704 / .zshrc
Last active Jul 15, 2018
Basic useful aliases and functions, always happy to add new ones.
View .zshrc
alias ..="cd .."
alias ...="cd ../.."
alias ls="ls -l"
alias lsa="ls -lA"
# docker
alias di="docker images"
alias dps="docker ps"
alias dpa="docker ps -a"
You can’t perform that action at this time.