Skip to content

Instantly share code, notes, and snippets.

View kellyrob99's full-sized avatar

Kelly Robinson kellyrob99

View GitHub Profile
@kellyrob99
kellyrob99 / repoAssetLister.groovy
Last active March 15, 2022 08:44
List all assets in a given repository that have been updated after a specific time
import org.sonatype.nexus.repository.storage.Asset
import org.sonatype.nexus.repository.storage.Query
import org.sonatype.nexus.repository.storage.StorageFacet
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def request = new JsonSlurper().parseText(args)
assert request.repoName: 'repoName parameter is required'
assert request.startDate: 'startDate parameter is required, format: yyyy-mm-dd'
@kellyrob99
kellyrob99 / rawPopulator.groovy
Created September 22, 2016 16:38
Uploads all files in a given directory to a Raw hosted Repository on Nexus 3.
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.2')
import groovyx.net.http.HTTPBuilder
import org.apache.http.HttpRequest
import org.apache.http.HttpRequestInterceptor
import org.apache.http.protocol.HttpContext
import static groovy.io.FileType.FILES
import static groovyx.net.http.ContentType.BINARY
import static groovyx.net.http.ContentType.TEXT
import static groovyx.net.http.Method.PUT
@kellyrob99
kellyrob99 / UpdateEnvironmentPlist.sh
Created May 26, 2016 18:40 — forked from SQiShER/UpdateEnvironmentPlist.sh
Two simple commands to resolve problems with Maven installed via Homebrew
defaults write ~/.MacOSX/environment.plist M2_HOME `brew --prefix maven`/libexec
defaults write ~/.MacOSX/environment.plist M2 `brew --prefix maven`/libexec/bin
@kellyrob99
kellyrob99 / README.md
Created October 2, 2015 02:56 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

/*
* Copyright (c) 2011-2014 Sonatype, Inc. All rights reserved.
* Includes the third-party code listed at http://links.sonatype.com/products/clm/attributions.
* "Sonatype" is a trademark of Sonatype, Inc.
*/
/**
* @since 1.13.0
*/
@Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.1')
<?xml version="1.0" encoding="UTF-8"?>
<!--
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
@kellyrob99
kellyrob99 / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Grab('org.seleniumhq.selenium:selenium-firefox-driver:2.42.2')
@Grab(group='org.gebish', module='geb-core', version='0.9.3')
import com.sonatype.insight.brain.testing.functional.*
import geb.Browser
import geb.navigator.Navigator
//given the following page:
/*
<html>
<head>
@kellyrob99
kellyrob99 / build.gradle
Last active August 29, 2015 13:57
gradle dependencies
apply plugin: 'java'
repositories{
mavenCentral()
}
configurations {
dummy
}
dependencies {
From 73abd71abab3375b6f10876bcdcdcbc72ec65d5c Mon Sep 17 00:00:00 2001
From: Kelly Robinson <krobinson@sonatype.com>
Date: Wed, 5 Jun 2013 12:24:57 -0700
Subject: [PATCH] fixing dependencies in the pom to exclude tests and deps
already provided by the container
---
pom.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)