Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
String.metaClass.div = { f -> delegate + File.separator + f } | |
def extensions = ['.jpg','.css','.js','.jsp'] | |
def source = new File( args.length > 0 ? args[0] : '.' ).absolutePath | |
def dest = new File( args.length > 1 ? args[1] : discoverJBoss() ).absolutePath | |
println "Monitoring ${source}" | |
println "Any modified files will be copied to ${dest}" | |
def files = buildFileList(source, extensions) |
public static void main(String[] args) throws Exception { | |
ObjectMapper mapper = new ObjectMapper(); | |
JsonSchemaGenerator generator = new JsonSchemaGenerator(mapper); | |
JsonSchema jsonSchema = generator.generateSchema(Subscription.class); | |
StringWriter json = new StringWriter(); | |
mapper.configure(SerializationFeature.INDENT_OUTPUT, true); | |
mapper.writeValue(json, jsonSchema); | |
System.out.println(json.toString()); |
package utils | |
import groovy.json.JsonBuilder | |
import groovy.json.JsonSlurper | |
class HDD { | |
static save(Object content, String filePath) { | |
new File(filePath).write(new JsonBuilder(content).toPrettyString()) | |
} |
The basic structure of a React+Flux application (see other examples)
- /src/actions/AppActions.js - Action creators (Flux)
- /src/components/Application.js - The top-level React component
- /src/constants/ActionTypes.js - Action types (Flux)
- /src/core/Dispatcher.js - Dispatcher (Flux)
- /src/stores/AppStore.js - The main store (Flux)
Hi there! Since this post was originally written, nvm
has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!
Trickier than it seems.
package rxgorm.demo | |
import grails.artefact.Controller | |
import grails.rx.web.Rx | |
import grails.validation.ValidationException | |
import groovy.transform.CompileStatic | |
import static org.springframework.http.HttpStatus.* | |
import static grails.rx.web.Rx.* | |
import static rx.Observable.* |