This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| /* Demonstrate Sling Query in server-side Javascript */ | |
| var $ = Packages.org.apache.sling.query.SlingQuery.$ | |
| var SearchStrategy = Packages.org.apache.sling.query.api.SearchStrategy | |
| var resourceResolver = resource.getResourceResolver() | |
| var result = { | |
| siblings : $(resource).siblings(), | |
| rootChildren : $(resource).parents().last().children(), | |
| queryResult : $(resourceResolver) | |
| .searchStrategy(SearchStrategy.QUERY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import groovy.xml.MarkupBuilder | |
| /* Simple Groovy DSL example | |
| * slightly adapted from https://dzone.com/articles/groovy-dsl-simple-example | |
| */ | |
| class DslTest extends GroovyTestCase { | |
| void testDslUsage_outputText() { | |
| def memo = MemoDsl.make { | |
| to "Nirav Assar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/docker-compose/Makefile b/docker-compose/Makefile | |
| index 1f9ca78..600a8b5 100644 | |
| --- a/docker-compose/Makefile | |
| +++ b/docker-compose/Makefile | |
| @@ -3,6 +3,7 @@ DOCKER_REGISTRY ?= "" | |
| DOCKER_IMAGE_PREFIX ?= openwhisk | |
| PROJECT_HOME ?= ./openwhisk-master | |
| WSK_CLI ?= $(PROJECT_HOME)/bin/wsk | |
| +JAVA_OPTS ?= "" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script that signs an input file with all keys of a given Apache PMC | |
| # Example use: | |
| # | |
| # ./encrypt.sh https://people.apache.org/keys/group/sling.asc somefile.txt | |
| # | |
| # To list which keys a file has been encrypted for, use | |
| # | |
| # gpg --list-only --no-default-keyring --secret-keyring /dev/null <filename> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # RTD-X model for our example blog post | |
| name: Blog Post | |
| description: RTD-X sample Blog Post | |
| # which resource types are accepted in a POST | |
| # to this resource to create child resources | |
| post-here: | |
| - rtdx/samples/2018/blog/folder | |
| - rtdx/samples/2018/blog/imagefolder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # output of | |
| # find . -type f | grep -v ' ' | while read f ; do file "$f" | egrep -v 'Java|XML|ASCII|PNG|JPEG|GIF|Unicode text'; done | |
| ./ant.freeform/test/unit/data/example-projects/extbuildroot/build/built.file: empty | |
| ./api.search/test/unit/data/textFiles/latin2file.txt: ISO-8859 text, with no line terminators | |
| ./api.search/test/unit/data/textFiles/utf8file.txt: UTF-8 Unicode (with BOM) text | |
| ./api.search/test/unit/src/org/netbeans/modules/search/data/0_bytes: empty | |
| ./api.search/test/unit/src/org/netbeans/modules/search/data/1_byte: very short file (no magic) | |
| ./apisupport.harness/release/etc/applicationIcon.icns: Mac OS X icon, 47580 bytes, "ics#" type | |
| ./apisupport.harness/windows-launcher-src/app.ico: MS Windows icon resource - 5 icons, 48x48, 8 bits/pixel, 32x31, 8 bits/pixel | |
| ./autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed-twice.jar: Zip archive data, at least v2.0 to extract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Actual models would be parsed from YAML, JSON, ... | |
| // current code at | |
| // https://github.com/bdelacretaz/sling-whiteboard/tree/rtdx/rtdx/rtdx-core | |
| class DemoModels { | |
| static Collection<ResourceModel> getModels() { | |
| final List<ResourceModel> list = new ArrayList<>(); | |
| list.add(ResourceModel.BUILDER() | |
| .withName("rtdx/root") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # output of | |
| # find . -type f | grep -v ' ' | while read f ; do file "$f" | egrep -v 'Java|XML|ASCII|PNG|JPEG|GIF|Unicode text'; done | |
| ./ant.freeform/test/unit/data/example-projects/extbuildroot/build/built.file: empty | |
| ./api.search/test/unit/data/textFiles/latin2file.txt: ISO-8859 text, with no line terminators | |
| ./api.search/test/unit/data/textFiles/utf8file.txt: UTF-8 Unicode (with BOM) text | |
| ./api.search/test/unit/src/org/netbeans/modules/search/data/0_bytes: empty | |
| ./api.search/test/unit/src/org/netbeans/modules/search/data/1_byte: very short file (no magic) | |
| ./apisupport.harness/release/etc/applicationIcon.icns: Mac OS X icon, 47580 bytes, "ics#" type | |
| ./apisupport.harness/windows-launcher-src/app.ico: MS Windows icon resource - 5 icons, 48x48, 8 bits/pixel, 32x31, 8 bits/pixel | |
| ./autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/dummy-signed-twice.jar: Zip archive data, at least v2.0 to extract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%-- | |
| JSP page that demonstrates blocking System.exit() | |
| with a SecurityManager. | |
| Do NOT use on production systems unless you know | |
| EXACTLY what you are doing! | |
| --%> | |
| <%@page | |
| contentType="text/plain" | |
| pageEncoding="UTF-8" | |
| import=" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script that runs antlr4, the jar can be downloaded | |
| # from https://www.antlr.org/download/antlr-4.7.1-complete.jar | |
| java -jar ~/lib/antlr4/antlr-4.7.1-complete.jar $* |