Skip to content

Instantly share code, notes, and snippets.

View AgrawalAshishS's full-sized avatar

Ashish Agrawal AgrawalAshishS

  • Toshal Infotech
  • Surat, India
View GitHub Profile
@AgrawalAshishS
AgrawalAshishS / gist:0e4c2e55328049ca55bc9d25c7b39475
Created June 19, 2020 10:25
Delete old Jenkins build from all repositories (including from folder hierarchy)
import jenkins.model.Jenkins
import hudson.model.Job
MAX_BUILDS = 5
Jenkins.instance.getAllItems(AbstractItem.class).each {
try{
println it.fullName
def recent = it.builds.limit(MAX_BUILDS)
@AgrawalAshishS
AgrawalAshishS / gist:7b5efaf44431e5bdf7006a3675d019c6
Created September 27, 2016 19:10
create list of host entries from Route 53 page
jQuery(".GEHJJTKDMQ tr").each(function(){
var tr = this;
var name = jQuery(".GEHJJTKDIQE, .GEHJJTKDNHE", tr)
.map(function(){ return $(this).text(); })
.get()
.join(",")
console.log(name);
});