Skip to content

Instantly share code, notes, and snippets.

@fmjrey
fmjrey / StringUtils.java
Created March 22, 2016 13:15
Apache Common implementation of isBlank
public class StringUtils {
public static boolean isBlank(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return true;
}
for (int i = 0; i < strLen; i++) {
if ((Character.isWhitespace(str.charAt(i)) == false)) {
return false;
}
@fmjrey
fmjrey / ansi-repl.clj
Last active August 29, 2015 13:57
Counterclockwise Plugin script for adding ANSI escape code support in REPL view.
;; CounterClockWiwe plugin for adding ANSI escape code support to REPLs.
;; To enable its functionality install the ANSI console plugin found at:
;; https://github.com/mihnita/ansi-econsole
;; See CCW user documentation for details on plugin installation:
;; http://doc.ccw-ide.org/documentation.html#_user_plugins
;; See also:
;; https://code.google.com/p/counterclockwise/issues/detail?id=624
;; https://code.google.com/p/counterclockwise/issues/detail?id=629
;;
;; Latest version at https://gist.github.com/fmjrey/9889500
@fmjrey
fmjrey / Color_Picker.gm
Created April 20, 2011 17:02
Groovy Monkey script that opens Eclipse color picker
/*
* Menu: Color Picker
* Script-Path: /GroovyMonkeyScripts/monkey/Color_Picker.gm
* Kudos: fmjrey
* License: LGPL
* Job: UIJob
* DOM: http://groovy-monkey.sourceforge.net/update/plugins/net.sf.groovyMonkey.dom
*/
/*