Skip to content

Instantly share code, notes, and snippets.

kon@CharlieBe:~$ sudo bash
root@CharlieBe:~# sdk install groovy
SDKMAN: No update needed. Using existing candidates cache: ant,asciidoctorj,bpipe,ceylon,crash,cxf,gaiden,glide,gradle,grails,groovy,groovyserv,infrastructor,java,jbake,kotlin,kscript,lazybones,leiningen,maven,micronaut,sbt,scala,spark,springboot,sshoogr,vertx,visualvm
Not refreshing version cache now...
Validate groovy 2.5.1 for Linux64: valid
Validation URL: https://api.sdkman.io/2/candidates/validate/groovy/2.5.1/linux64
Get pre-installation hook: https://api.sdkman.io/2/hooks/pre/groovy/2.5.1/linux64
Copy remote pre-installation hook: /home/kon/.sdkman/tmp/hook_pre_groovy_2.5.1.sh
No Linux pre-install hook found for Groovy 2.5.1.
Completed pre-installation hook...

Keybase proof

I hereby claim:

  • I am neversleepz on github.
  • I am neversleepz (https://keybase.io/neversleepz) on keybase.
  • I have a public key ASBTq9EEAHBTj-7mKg3CJ3VzOiHWxXZPVbRdyBvFNWMnMwo

To claim this, I am signing this object:

@neversleepz
neversleepz / ListToIndexedMapBuilder.java
Created December 12, 2016 04:41
Made this for a colleague. An arguably, improved way to use streams api to parse a collection, providing the index (for failure messages)
package org.outrospective.streams;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class ListToIndexedMapBuilder {
@neversleepz
neversleepz / build.gradle
Created August 26, 2014 18:34
Inplace html files that swap out version numbers but still allow gradle to keep up to date checks
apply plugin: 'java'
apply plugin: 'jetty'
sourceCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
}
@neversleepz
neversleepz / gist:7579487
Last active October 8, 2016 11:30 — forked from berinle/gist:1487328
Installing Groovy, Grails, Gradle support for TextMate 2 Directory is slightly different to normal Groovy TM Bundle install instructions
cd ~/Library/Application\ Support\TextMate/Managed/Bundles
#clone groovy bundle
git clone https://github.com/textmate/groovy.tmbundle.git
#clone grails bundle
git clone https://github.com/textmate/groovy-grails.tmbundle.git
#clone RTF bundle
git clone git://github.com/drnic/copy-as-rtf-tmbundle.git "Copy as RTF.tmbundle"
@neversleepz
neversleepz / LoggingFromConsoleScript.groovy
Created November 9, 2013 03:09
Configuring log4j for use in a groovy script. Reading log4j config (via a config slurper)
/**
* Use log4j in a groovy script, with configuration from a groovy like config file
*
* As asked in this
* <a href="http://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow question - groovy-script-and-log4j</a>
*
*
* Tested with Java 7, Groovy 2.1.9
* User: kon
* Date: 9/11/13
@neversleepz
neversleepz / LoggingFromConsoleScript.groovy
Created November 9, 2013 02:08
Use log4j in a groovy script As asked in this <a href="http://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow question - groovy-script-and-log4j</a>
/**
* Use a Grails based Config.groovy to configure log4j
*
* As asked in this
* <a href="http://stackoverflow.com/questions/19868180/groovy-script-and-log4j">stackoverflow question - groovy-script-and-log4j</a>
*
*
* Tested with Java 7, Groovy 2.1.9
* User: kon
* Date: 9/11/13