View FindFile.groovy
import groovy.transform.TypeChecked | |
/** | |
* search file according to its name in directory and subdirectories | |
*/ | |
@TypeChecked | |
class FileFind { | |
String basePath; // for unit testing |
View DuplicatePropDetectWithCommonsConfig.java
package com.octodecillion.util; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Properties; |
View HexDump.groovy
package com.octodecillion.util | |
import static java.lang.Character.* | |
/** | |
* Simple ASCII hex dump of file. | |
* <p> | |
* Example output:<br> | |
* <pre> | |
* OFFSET 0 1 2 3 4 5 6 7 8 9 a b c d e f | ASCII |
View index.js
import React from 'react'; | |
import {render} from 'react-dom'; | |
import "babel-polyfill"; | |
import invariant from "invariant"; | |
/** | |
* A P P | |
* | |
*/ | |
var App = React.createClass({ |
View Toggle.js
// Toggle.js RxJS example of reactive toggable and cancellable process loop | |
// By: Josef Betancourt | |
// Date: Jan 11, 2016 | |
// =========== Model | |
var counter = 1; | |
var runningState = true; | |
var msg = ''; | |
var runButtonValue = 'Start'; |
View PruneDeletionTree.java
package com.octodecillion.learn.rxjava; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import rx.Observable; | |
/** | |
* | |
* @author jbetancourt |
View HelloRxTest.java
package com.octodecillion.learn.rxjava; | |
import static org.hamcrest.core.Is.is; | |
import static org.junit.Assert.assertThat; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
import org.junit.Assert; | |
import org.junit.Before; |
View INIX-example.inix
# Example very simple data file | |
# | |
[>root] | |
one | |
two | |
three | |
[<root] | |
[>demo1/compile] | |
x,y,z | |
[<demo1/compile] |
View GoGenerator.groovy
/** | |
* GoGenerator.groovy | |
* Copyright 2010 Josef Betancourt 20100312-17:47 | |
*/ | |
/*@Grapes([ | |
@Grab(group='ch.qos.logback', module='logback-core', version='0.9.18'), | |
@Grab(group='ch.qos.logback', module='logback-classic', version='0.9.18'), | |
@Grab(group='org.slf4j', module='slf4j-api', version='1.5.10')]) |
View Gather.groovy
package com.octodecillion | |
import java.nio.file.Files; | |
/** | |
* Simple folder walker and file parser. | |
* <p> | |
* Dev with Groovy 2.1.6, Java 7, Eclipse 4.3 | |
* | |
* @author jbetancourt |
NewerOlder