text:
title=Repository Initialization (repoinit)
type=page
status=published
tags=repoinit,jcr,repository
~~~~~~

The `SlingRepositoryInitializer` mechanism (short: repoinit) allows for running code before the `SlingRepository` service is registered. This is useful for initialization and content migration purposes.

The code (in form of statements) being executed through repoinit ensures that the repository has a certain state.
In case the repository cannot be set up as being mandated through the repoinit statements the startup of the repository **fails**.
This may happen in case the existing parent nodes have node type restrictions which don't allow for the new repository state or in general when the existing node/property state is conflicting with the target one.

For historical reasons two statements deviate from that by not failing in case the desired repository state cannot be achieved:

1. `create path` will not touch/modify existing nodes (i.e. does neither adjust primary nor mixin types if they differ), therefore it has been deprecated and replaced by `ensure nodes` [SLING-11736](https://issues.apache.org/jira/browse/SLING-11736)
1. `set principal ACL` will not fail in case the principal ACL cannot be applied for whatever reason, therefore it has been deprecated and replaced by `ensure princial ACL` [SLING-10281](https://issues.apache.org/jira/browse/SLING-10281)

Starting with version 1.1.40 of the bundle `org.apache.sling.jcr.repoinit` repoinit scripts are safely executed also in environments with a shared repository; this is implemented by a retry-mechanism with randomized delays.

## SlingRepositoryInitializer
The `SlingRepositoryInitializer` is a very simple service interface, available from version 2.4.0 of the `org.apache.sling.jcr.api` and `org.apache.sling.jcr.base` bundles.

	public interface SlingRepositoryInitializer {
	    public void processRepository(SlingRepository repo) throws Exception;
	}

Services that implement this interface are called when setting up the JCR-based `SlingRepository` service, before registering it as an OSGi service.

They are called in increasing order of their `service.ranking` service property, which needs to be an `Integer` as usual.

If any of them throws an Exception, the `SlingRepository` service is not registered.

This mechanism is used under the hood by repoinit.

## The 'repoinit' Repository Initialization Language
The `org.apache.sling.repoinit.parser` implements a mini-language meant to create nodes, properties, service users and manage access control in a content repository, as
well as registering JCR namespaces, node types and privileges. Defining access control content consists of setting and
deleting policies of type access control lists (ACL) for which individual access control entries (ACE) can be added and removed.

The source code consists of [two modules](https://github.com/apache?utf8=%E2%9C%93&q=sling+repoinit): the parser and the JCR
repoinit adapter module.

The language grammar is defined (using the JavaCC compiler-compiler, which has no runtime dependencies) in the `RepoInitGrammar.jjt` file in that module, and the automated tests provide a number of [test cases](https://github.com/apache/sling-org-apache-sling-repoinit-parser/tree/master/src/test/resources/testcases) which demonstrate various features.

The companion `org.apache.sling.jcr.repoinit` module implements those operations on an Oak JCR repository, using a `SlingRepositoryInitializer`
registered by default with a service ranking of 100. It also provides a `JcrRepoInitOpsProcessor` service to explicitly apply the output
of the repoinit parser to a JCR repository.

The language is mostly self-explaining, the test suite listed below in Appendix A exposes
all language constructs and options.

## Validating repoinit statements

There are multiple means to validate the syntax of repoinit statements (only leveraging the parser, but not the actual JCR Repoinit implementation) outlined below.

### FileVault Validator

There is a [FileVault validator](https://jackrabbit.apache.org/filevault/validation.html) for repoinit OSGi configurations (contained in FileVault Content Packages) in repository [sling-org-apache-sling-repoinit-filevault-validator](https://github.com/apache/sling-org-apache-sling-repoinit-filevault-validator). Further details on how to use it can be found in its [readme file](https://github.com/apache/sling-org-apache-sling-repoinit-filevault-validator/blob/master/README.md).

### JBang Script

A [jbang script in the Sling whiteboard repository](https://github.com/apache/sling-whiteboard/blob/master/jbang/RepoinitValidator.java) can be used to test the syntax of repoinit statements by running a specific version of the repoinit parser on them.

### Web Console Plugin

There is a [Felix Web Console Plugin in the Sling whiteboard repository](https://github.com/apache/sling-whiteboard/tree/master/org.apache.sling.repoinit.webconsole) which allows to validate and optionally also execute repoinit statements.

## Providing repoinit statements from OSGi factory configurations

From version 1.1.6 of the `org.apache.sling.jcr.repoinit` bundle, repoinit statements can also be provided by OSGi factory
configurations which use the `org.apache.sling.jcr.repoinit.RepositoryInitializer` factory PID.

Such configurations have two optional fields:

  * A multi-value `references` field with each value providing the URL (as a String) of raw repoinit statements.
  * A multi-value `scripts` field with each value providing repoinit statements as plain text in a String.

Any of the serialization formats for OSGi configurations can be used, but it is important to consider the escaping rules outlined at [OSGi Configurations Serialization Formats](/documentation/bundles/configuration-installer-factory.html#configuration-serialization-formats).

## Providing repoinit statements from the Sling provisioning model or other URLs

All bundles required for this feature need to be active before the `SlingRepository` service starts.

From version 1.0.2 of the `org.apache.sling.jcr.repoinit` bundle, the `o.a.s.jcr.repoinit.RepositoryInitializer` component uses an OSGi
configuration as shown in this example to define where to read repoinit statements:

  org.apache.sling.jcr.repoinit.impl.RepositoryInitializer
    references=["model:context:/resources/provisioning/model.txt","model@repoinitTwo:context:/resources/provisioning/model.txt"]

This example defines two _references_ to URLs that supply repoinit statements. Their syntax is described below.

By default the `RepositoryInitializer` uses the first URL shown in the above example, which points to the provisioning model that's embedded by default in the Sling Launchpad runnable jar.

Note that previous versions of the `org.apache.sling.jcr.repoinit` bundle used different configuration parameters. From version 1.0.2 on, warnings are logged if those old parameters (_text.url,text.format,model.section.name_) are used.

### References to Sling Provisioning Model additional sections
The `slingstart-maven-plugin`, from V1.4.2 on, allows for embedding so-called "additional sections" in the Sling provisioning model by starting
their name with a colon.

At runtime this requires the `org.apache.sling.provisioning.model` bundle, version 1.4.2 or later.

The `o.a.s.jcr.repoinit` bundle can use this feature to execute `repoinit` statements provided by Sling provisioning models, as in this
provisioning model example fragment:

  [:repoinit]
  create path /repoinit/provisioningModelTest

  create service user provisioningModelUser

To read repoinit statements from such an additional provisioning model section, the `RepositoryInitializer` configuration shown above uses references like

  model@repoinitTwo:context:/resources/provisioning/model.txt

Where _model_ means "use the provisioning model format", _repoinitTwo_ is the name of the additional section to read statements from in the provisioning
model (without the leading colon) and _context:/resources/..._ is the URL to use to retrieve the provisioning model.

In this example the URL uses the _context_ scheme defined by the Sling Launchpad, but any scheme can be used provided a suitable URL handler is active.

The section name in that reference is optional and defaults to _repoinit_. If it's not specified the `@` should be omitted as well.

### References to URLs providing raw repoinit statements
Using a `RepositoryInitializer` reference like in this example, with the _raw_ prefix, means that its content is passed as is to the repoinit parser:

  raw:classpath://some-repoinit-file.txt

Which points to a `classpath:` URL to provide the raw repoinit statements in this example, but again any valid URL scheme can be used.

# Appendix

## Appendix A: repoinit syntax: parser test scenarios
A concatenation of all test scenarios from the
[repoinit parser module](https://github.com/apache/sling-org-apache-sling-repoinit-parser/tree/master/src/test/resources/testcases)
follows.

Assuming that test suite is complete, this exposes all the language constructs
and options, with descriptive comments where needed. If something's unclear, please
ask or provide patches for these tests to make them easier to understand.

The following output is generated by the [concatenate-test-scenarios.sh](https://github.com/apache/sling-org-apache-sling-repoinit-parser/tree/master/concatenate-test-scenarios.sh) script found in the
repoinit parser repository.

### Repoinit parser test scenarios

    # test-1.txt

    create service user bob,alice, tom21
    create service user lonesome
    create service user pathA with path some/relative/path
    create service user pathA with path /some/absolute/path

    # test-2.txt

    create service user Mark-21
    delete service user Leonardo,Winston_32

    # test-3.txt

    #
    # single-word
    # We're testing the comments now
    # This is A COMMENT with other things like 12, 34
    # And now for a tag, <ok> ?
    # And some punctuation: .,;-_[]+"*ç%&/()=?^`"
       # Also with leading whitespace.

    # blank lines work, of course
    create service user comments_test_passed

    # test-4.txt

    # trailing comments test
    create service user comments_test_passed
    # something

    # test-5.txt

    # trailing comments test without following blank lines
    create service user comments_test_passed
    # something

    # test-10.txt

    # Set ACL example from SLING-5355
    # Without the "with glob" option, we're not planning to support
    # that at this time.
    set ACL on /libs,/apps, /, /content/example.com/some-other_path
        remove * for user1,user2
        allow jcr:read for user1,user2
        allow privilege_without_namespace for user4

        deny jcr:write,something:else,another:one for user2
        deny jcr:lockManagement for user1
        deny jcr:modifyProperties for user2 restriction(rep:itemNames,prop1,prop2)
    end

    set ACL on /no-indentation
    allow jcr:read for userA,userB
    end

    # test-11.txt

    # Test multiple remove lines
    # Although the repoinit language includes a remove statement,
    # it is not generally supported by the current version of the
    # o.a.s.jcr.repoinit module. Only the "remove *" variant is
    # supported starting with o.a.s.jcr.repoinit V1.1.34
    set ACL on /libs,/apps
        remove * for user1,user2
        allow jcr:read for user1,user2

        remove * for another
        allow x:y for another

        remove jcr:ACL for userTestingSpecificRemove
    end

    # test-12.txt

    # Test path-centric Set Acl with options (SLING-6423)
    set ACL on /libs,/apps (ACLOptions=merge)
        remove * for user1,user2
        allow jcr:read for user1,user2

        remove * for another
        allow x:y for another
    end

    # Multiple options
    set ACL on /libs,/apps (ACLOptions=mergePreserve,someOtherOption,someOther123,namespaced:option)
        remove * for user1,user2
        allow jcr:read for user1,user2

        remove * for another
        allow x:y for another
    end

    # test-13.txt

    # Test for repository-level ACL (SLING-7061), requires
    # o.a.s.repoinit.parser 1.2.0, o.a.s.jcr.repoinit 1.1.6
    set repository ACL for user1,user2
        remove *
        allow jcr:read,jcr:lockManagement
        deny jcr:write
    end

    # test-14.txt

    # Test allowed path characters, see SLING-6774
    set ACL on /one:name,/two+name,/three@name
        remove * for user1
        allow jcr:read for user1
    end

    # test-15.txt

    # Mixing paths and repo-level ACL
    set ACL on /content,:repository
        allow jcr:all for user1
    end

    # test-20.txt

    # Various "ensure nodes" tests (SLING-11736)
    # requires
    # o.a.s.repoinit.parser 1.9.0 and
    # o.a.s.jcr.repoinit 1.1.44

    # Nodetypes:
    # A nodetype in brackets right after "ensure nodes", like
    # sling:Folder below, sets the default type for all path
    # segments of this statement.
    # A nodetype in brackets at the end of a path segment, like
    # nt:unstructured below, applies just to that path segment.
    # If no specific nodetype is set, the repository uses its
    # default based on node type definitions.

    ensure nodes (sling:Folder) /var/discovery(nt:unstructured)/somefolder

    # more tests and examples
    ensure nodes /one/two/three
    ensure nodes /three/four(nt:folk)/five(nt:jazz)/six
    ensure nodes (nt:x) /seven/eight/nine
    ensure nodes /one(mixin nt:art)/step(mixin nt:dance)/two/steps
    ensure nodes (nt:foxtrot) /one/step(mixin nt:dance)/two/steps
    ensure nodes /one/step(mixin nt:dance,nt:art)/two/steps
    ensure nodes /one/step(nt:foxtrot mixin nt:dance)/two/steps
    ensure nodes /one/step(nt:foxtrot mixin nt:dance,nt:art)/two/steps
    ensure nodes /one:and/step/two:and/steps
    ensure nodes /one@home/step/two@home/steps
    ensure nodes /one+tap/step/two+tap/steps

    # this is to cover an edge case: SLING-11384 (create root node with primary type)
    ensure nodes /(nt:x)

    # SLING-10740 - Repoinit ensure nodes statement with properties
    ensure nodes (sling:Folder) /var/discovery(nt:unstructured)/somefolder2 with properties
      set sling:ResourceType{String} to /x/y/z
      set cq:allowedTemplates to /d/e/f/*, m/n/*
      default someInteger{Long} to 42
    end

    # test-30.txt

    # Test the principal-centered ACL syntax

    set ACL for user1,u2
        remove * on /libs,/apps
        allow jcr:read on /content

        deny jcr:write on /apps

        # Optional nodetypes clause
        deny jcr:lockManagement on /apps, /content nodetypes sling:Folder, nt:unstructured
        # nodetypes clause with restriction clause
        deny jcr:modifyProperties on /apps, /content nodetypes sling:Folder, nt:unstructured restriction(rep:itemNames,prop1,prop2)
        remove jcr:understand,some:other on /apps

        # multi value restriction
        allow jcr:addChildNodes on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured)

        # multiple restrictions
        allow jcr:modifyProperties on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)

        # restrictions with glob patterns
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat,/cat/,cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,cat/,*,*cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat/*,*/cat,*cat/*)

        allow jcr:something on / restriction(rep:glob)
    end

    # test-31.txt

    # Principal-centered ACL syntax with options (SLING-6423)
    set ACL for user1,u2 (ACLOptions=mergePreserve)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # With multiple options
    set ACL for user1,u2 (ACLOptions=mergePreserve,someOtherOption,someOther123,namespaced:option)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # test-32.txt

    # repo-level permissions in "set ACL for"
    set ACL for user1
        allow jcr:all on :repository,/content
    end

    # test-33.txt

    # Set principal-based access control (see SLING-8602 and SLING-10281), requires
    # o.a.s.repoinit.parser 1.9.0 and
    # o.a.s.jcr.repoinit 1.1.44
    # precondition for o.a.s.jcr.repoinit:
    # repository needs to support 'o.a.j.api.security.authorization.PrincipalAccessControlList'
    # Also, this only works for users selected by the Jackrabbit/Oak FilterProvider, see
    # https://jackrabbit.apache.org/oak/docs/security/authorization/principalbased.html#configuration
    # mostly a copy of test-33 but with "ensure" prefix instead of "set"

    ensure principal ACL for principal1,principal2
        remove * on /libs,/apps
        allow jcr:read on /content

        deny jcr:write on /apps

        # Optional nodetypes clause
        deny jcr:lockManagement on /apps, /content nodetypes sling:Folder, nt:unstructured
        # nodetypes clause with restriction clause
        deny jcr:modifyProperties on /apps, /content nodetypes sling:Folder, nt:unstructured restriction(rep:itemNames,prop1,prop2)
        remove jcr:understand,some:other on /apps

        # multi value restriction
        allow jcr:addChildNodes on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured)

        # multiple restrictions
        allow jcr:modifyProperties on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)

        # restrictions with glob patterns
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat,/cat/,cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,cat/,*,*cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat/*,*/cat,*cat/*)

        allow jcr:something on / restriction(rep:glob)
    end

    # Principal-based ACL syntax with options (SLING-6423)
    ensure principal ACL for principal1,principal2 (ACLOptions=mergePreserve)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # With multiple options
    ensure principal ACL for principal1,principal2 (ACLOptions=mergePreserve,someOtherOption,someOther123,namespaced:option)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # repository level
    ensure principal ACL for principal1,principal2
        allow jcr:namespaceManagement on :repository
    end

    ensure principal ACL for principal1
        allow jcr:all on :repository,/content
    end

    # test-34.txt

    # Functions at the beginning of path names (SLING-8757)

    set ACL on home(alice)
      allow jcr:one for alice, bob, carol
    end

    set ACL on home(jack),/tmp/a,functionNamesAreFree(bobby)
      allow jcr:two for alice
    end

    set ACL for fred
      allow jcr:three on /one,home(Alice123),/tmp
    end

    set ACL on /a/b,home(jack),/tmp/a,square(bobby)
      allow jcr:four for alice
    end

    set ACL for austin
      allow jcr:five on /one,home(Alice123),/tmp
    end

    set ACL on home(  spacesAreOk )
      allow jcr:six for spaceman
    end

    set ACL on home(alice)/sub/folder, /anotherPath, home(fred)/root
      allow jcr:seven for mercury
    end

    # test-35.txt

    # Removal of individual access control entries (see SLING-11160), requires
    # o.a.s.repoinit.parser 1.6.14 and
    # o.a.s.jcr.repoinit 1.1.38

    # remove entries by path

    remove ACE on /libs,/apps, /, /content/example.com/some-other_path
        allow jcr:read for user1,user2
        allow privilege_without_namespace for user4
        deny jcr:write,something:else,another:one for user2
        deny jcr:lockManagement for user1
        deny jcr:modifyProperties for user2 restriction(rep:itemNames,prop1,prop2)
    end

    # remove entries by principal

    remove ACE for user1,u2
        allow jcr:read on /content
        allow jcr:addChildNodes, jcr:modifyProperties on /content restriction(rep:glob)
        deny jcr:read on /etc, /var restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)
    end

    # remove principal-based entries

    remove principal ACE for principal1,principal2
        allow jcr:read on /content
        deny jcr:modifyProperties on /apps, /content restriction(rep:itemNames,prop1,prop2)
        allow jcr:addChildNodes on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured)
        allow jcr:modifyProperties on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat,/cat/,cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,cat/,*,*cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat/*,*/cat,*cat/*)
        allow jcr:something on / restriction(rep:glob)
        allow jcr:all on :repository,home(alice)
    end

    # test-40.txt

    # Register namespaces, requires
    # o.a.s.repoinit.parser 1.0.4
    # and o.a.s.jcr.repoinit 1.0.2
    # Quoted Namespaces requires
    # o.a.s.repoinit.parser 1.6.16
    register namespace (foo) uri:some-uri/V/1.0
    register namespace ( prefix_with-other.things ) andSimpleURI
    register namespace (foo2) "uri:some-uri/V/1.1/test#"

    # test-42.txt

    # Register privileges
    register privilege withoutabstract_withoutaggregates
    register privilege ns:withoutabstract_withoutaggregatesNS
    register abstract privilege withabstract_withoutaggregates
    register abstract privilege ns:withabstract_withoutaggregatesNS

    register privilege withoutabstract_withaggregate with bla
    register privilege withoutabstract_withaggregates with bla,blub
    register privilege withoutabstract_withaggregates with bla,ns:namespacedA
    register privilege ns:withoutabstract_withaggregates with bla,ns:namespacedB

    register abstract privilege withabstract_withaggregate with foo
    register abstract privilege withabstract_withaggregates with foo,bar
    register abstract privilege withabstract_withaggregates with foo,ns:namespacedC
    register abstract privilege ns:withabstract_withaggregates with foo,ns:namespacedD

    register privilege priv with declared_aggregate_priv1,declared_aggregate_priv2
    register privilege priv with declared_aggregate_priv1,namespaced:_priv4

    # test-50.txt

    # Embedded CNDs for nodetype definitions

    register nodetypes
    <<===
        <slingevent='http://sling.apache.org/jcr/event/1.0'>
        <nt='http://www.jcp.org/jcr/nt/1.0'>
        <mix='http://www.jcp.org/jcr/mix/1.0'>

        [slingevent:Event] > nt:unstructured, nt:hierarchyNode
          - slingevent:topic (string)
          - slingevent:application (string)
          - slingevent:created (date)
          - slingevent:properties (binary)

        [slingevent:Job] > slingevent:Event, mix:lockable
          - slingevent:processor (string)
          - slingevent:id (string)
          - slingevent:finished (date)

        [slingevent:TimedEvent] > slingevent:Event, mix:lockable
          - slingevent:processor (string)
          - slingevent:id (string)
          - slingevent:expression (string)
          - slingevent:date (date)
          - slingevent:period (long)
    ===>>

    register nodetypes
    <<===
    Just one line, not indented
    ===>>

    register nodetypes
    <<===
    << Using line prefixes
    << to avoid conflicts with Sling provisioning model parser
    ===>>

    # test-60.txt

    # Create/delete users

    delete user userB
    create user userB

    create user userC with password some_password

    # Although the following syntax is valid for encrpyted passwords,
    # the o.a.s.jcr.repoinit module only supports plain text
    # ones, see SLING-6219
    create user userD with password {SHA-256}dc460da4ad72c
    create user userE with password {someEncoding} afdgwdsdf

    create user one_with-more-chars.ok:/123456 with password {encoding_with.ok-:/12345} pw-with.ok-:/13456

    create user userF with path /thePathF
    create user userG with path /thePathG with password {theEncoding} userGpwd
    create user userH with path thePathH
    create user userJ with path thePathJ with password {theEncoding} userJpwd

    # test-61.txt

    # Disable service users
    disable service user svcA : "This message explains why it's disabled.  Whitespace   is  preserved."
    disable service user svcB : "Testing escaped double \"quote\" in this string."
    disable service user svcC : "Testing escaped backslash \\ in this string."
    disable service user svcD : "Testing quoted escaped backslash \"\\\" in this string."
    disable service user svcE : "Testing unescaped single backslash \ in this string."

    # test-62.txt

    # Create groups
    create group groupa
    create group groupb with path /thePathF

    # test-63.txt

    # Delete groups
    delete group groupa

    # test-64.txt

    # Add members to groups
    add user1,user2 to group grpA

    # test-65.txt

    # Remove members from group
    remove user3,user5 from group grpB

    # test-66.txt

    # Add and remove group members
    add user1,user2 to group grpA
    add user3 to group grpB
    add user4,user5 to group grpB
    remove user1 from group grpA
    remove user3,user5 from group grpB

    # test-67.txt

    # Set properties
    set properties on /pathA, /path/B
      set sling:ResourceType{String} to /x/y/z
      set cq:allowedTemplates to /d/e/f/*, m/n/*
      default someInteger{Long} to 42
      set aDouble{Double} to 3.14
      set someFlag{Boolean} to true
      default someDate{Date} to "2020-03-19T11:39:33.437+05:30"
      set customSingleValueStringProp to test
      set customSingleValueQuotedStringProp to "hello, you!"
      set customMultiValueStringProp to test1, test2
      default threeValues to test1, test2, test3
      set quotedA to "Here's a \"double quoted string\" with suffix"
      set quotedMix to "quoted", non-quoted, "the last \" one"
    end

    set properties on /single/path
      set someString to "some string"
    end

    set properties on /test/curly/brackets
      set curlyBracketsAndDoubleQuotes{String} to "{\"one, two\":\"three, four\"}"
      set curlyBracketsAndSingleQuotes{String} to "{'five, six':'seven,eight'}"
    end

    set properties on /endkeyword
      # using "end" instead of "endS" below causes parsing to fail
      set endS to one
      set two to endS
    end

    set properties on /forcedMultiValue
      set singleMultiValue{String[]} to "single"
      set emptyMultiValue{String[]} to
      set singleLongMultiValue{Long[]} to 1243
      set emptyLongMultiValue{Long[]} to
    end

    set properties on /blankLinesInList
      set one to two

      set two to four

      set three to five
    end

    # SLING-10252: set properties on the user or group profile
    set properties on authorizable(bob)
      set stringProp to "hello, you!"
    end
    set properties on authorizable(bob)/nested
      set stringProp to "hello, you nested!"
    end

    set properties on authorizable(bob), authorizable(alice)
      set stringProp to "hello, you again!"
    end
    set properties on authorizable(bob)/nested, authorizable(alice)/nested
      set stringProp to "hello, you nested again!"
    end

    # test-68.txt

    # SLING-9857: "with forced path" option
    create user A with path /path/user/A
    create user AF with forced path /path/user/AF

    create service user B with path /path/service/B
    create service user BF with forced path /path/service/BF

    create group G with path /path/group/G
    create group GF with forced path /path/group/GF

    # test-69.txt

    # Disable users, with various messages
    disable user A : "This message explains why it's disabled.  Whitespace   is  preserved."
    disable user uB : "Testing escaped double \"quote\" in this string."
    disable user userC : "Testing escaped backslash \\ in this string."
    disable user D : "Testing quoted escaped backslash \"\\\" in this string."
    disable user E : "Testing unescaped single backslash \ in this string."

    # test-70.txt

    # Remove AC policies entirely (not just individual entries)
    delete ACL for ana
    delete ACL for alice, aida
    delete ACL on :repository, home(anni), functionNamesAreFree(aendu)
    delete ACL on /, /var, /etc
    delete ACL on /content
    delete principal ACL for ada, amy
    delete principal ACL for adi

    # test-71.txt

    # Support quoted Group IDs
    create group "Test Group"
    create group "Test Group With Spaces" with path /thePathF
    delete group "Test Group"
    set ACL on /content
        allow jcr:read for "Test Group",user1
    end
    set ACL on /content
        allow jcr:read for "Test Group- Cool People","Test Group",user1
    end
    set ACL for user1,"Test Group",u2
        allow jcr:read on /content
    end
    set principal ACL for user1,"Test Group" (ACLOptions=mergePreserve)
        remove * on /libs,/apps
        allow jcr:read on /content
    end
    set ACL on /test (ACLOptions=merge)
        remove * for user1,"Test Group",user2
    end
    set properties on authorizable(bob), authorizable("Test Group")
      set stringProp to "hello, you again!"
    end
    set properties on authorizable(bob)/nested, authorizable("Test Group")/nested
      set stringProp to "hello, you nested again!"
    end
    add user1,"Test Group 2000",user2 to group "Parent Group"
    remove user1,"Test Group 2000",user2 from group "Parent Group"

    # Test other escaped characters
    create group "Tab	Group"
    create group "Untrimmed Group "
    create group " Really Untrimmed Group "
    create group "Group\With\Backslash"
    create group "Group
    Newline"

    # test-72.txt

    add mixin mix:one to /thePath1
    add mixin mix:one,mix:two to /thePath1,/thePath2
    add mixin mix:three, mix:four to /thePath3, /thePath4

    remove mixin mix:one from /thePath1
    remove mixin mix:one,mix:two from /thePath1,/thePath2
    remove mixin mix:three, mix:four from /thePath3, /thePath4

    # test-73.txt

    # Various "create path" tests
    # as "create path" does not modify existing nodes it is deprecated and "ensure nodes" should be used instead

    # Nodetypes:
    # A nodetype in brackets right after "create path", like
    # sling:Folder below, sets the default type for all path
    # segments of this statement.
    # A nodetype in brackets at the end of a path segment, like
    # nt:unstructured below, applies just to that path segment.
    # If no specific nodetype is set, the repository uses its
    # default based on node type definitions.

    create path (sling:Folder) /var/discovery(nt:unstructured)/somefolder

    # more tests and examples
    create path /one/two/three
    create path /three/four(nt:folk)/five(nt:jazz)/six
    create path (nt:x) /seven/eight/nine
    create path /one(mixin nt:art)/step(mixin nt:dance)/two/steps
    create path (nt:foxtrot) /one/step(mixin nt:dance)/two/steps
    create path /one/step(mixin nt:dance,nt:art)/two/steps
    create path /one/step(nt:foxtrot mixin nt:dance)/two/steps
    create path /one/step(nt:foxtrot mixin nt:dance,nt:art)/two/steps
    create path /one:and/step/two:and/steps
    create path /one@home/step/two@home/steps
    create path /one+tap/step/two+tap/steps

    # this is to cover an edge case: SLING-11384 (create root node with primary type)
    create path /(nt:x)

    # SLING-10740 - Repoinit create path statement with properties
    create path (sling:Folder) /var/discovery(nt:unstructured)/somefolder2 with properties
      set sling:ResourceType{String} to /x/y/z
      set cq:allowedTemplates to /d/e/f/*, m/n/*
      default someInteger{Long} to 42
    end

    # test-74.txt

    # Set principal-based access control (see SLING-8602), requires
    # o.a.s.repoinit.parser 1.2.8 and
    # o.a.s.jcr.repoinit 1.1.14
    # precondition for o.a.s.jcr.repoinit:
    # repository needs to support 'o.a.j.api.security.authorization.PrincipalAccessControlList'
    # Also, this only works for users selected by the Jackrabbit/Oak FilterProvider, see
    # https://jackrabbit.apache.org/oak/docs/security/authorization/principalbased.html#configuration
    # Deprecated: Use "ensure principal ACL" instead as "set principal ACL" is not failing if it cannot be applied
    set principal ACL for principal1,principal2
        remove * on /libs,/apps
        allow jcr:read on /content

        deny jcr:write on /apps

        # Optional nodetypes clause
        deny jcr:lockManagement on /apps, /content nodetypes sling:Folder, nt:unstructured
        # nodetypes clause with restriction clause
        deny jcr:modifyProperties on /apps, /content nodetypes sling:Folder, nt:unstructured restriction(rep:itemNames,prop1,prop2)
        remove jcr:understand,some:other on /apps

        # multi value restriction
        allow jcr:addChildNodes on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured)

        # multiple restrictions
        allow jcr:modifyProperties on /apps restriction(rep:ntNames,sling:Folder,nt:unstructured) restriction(rep:itemNames,prop1,prop2)

        # restrictions with glob patterns
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat,/cat/,cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,cat/,*,*cat)
        allow jcr:addChildNodes on /apps,/content restriction(rep:glob,/cat/*,*/cat,*cat/*)

        allow jcr:something on / restriction(rep:glob)
    end

    # Principal-based ACL syntax with options (SLING-6423)
    set principal ACL for principal1,principal2 (ACLOptions=mergePreserve)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # With multiple options
    set principal ACL for principal1,principal2 (ACLOptions=mergePreserve,someOtherOption,someOther123,namespaced:option)
        remove * on /libs,/apps
        allow jcr:read on /content
    end

    # repository level
    set principal ACL for principal1,principal2
        allow jcr:namespaceManagement on :repository
    end

    set principal ACL for principal1
        allow jcr:all on :repository,/content
    end

repository: apache/sling-site

gha_language: HTML

repo_name: apache/sling-site


text:
task-graph
==========

A JavaScript app for drawing graph-like task structure

### Preview

You can preview the app [here](http://kypp.github.io/task-graph).

### Controls

Use the following controls for graph manipulation:

Action | Function
--- | ---
**double click** | anywhere to create a _node_ there
**input text** | into the textbox in the _top right corner_ to make new nodes have it as their _title_
**shift-drag**| from a node to another node to make an _edge_
**drag** | a node to _move_ it
**space-drag** | to move around the whole _graph_

license: MIT

repository: kypp/taskgraph

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: kypp/taskgraph


text:
# BashTechTalk
Resources for an Introduction to Bash tech talk for RIT's Society of Software Engineers

## Getting Started with Bash
[Bash](https://www.gnu.org/software/bash/) is the Bourne Again SHell, a shell program meant to incorporate useful features from [Korn Shell](http://www.kornshell.org/) and the [C Shell](https://en.wikipedia.org/wiki/C_shell). It provides important functionality that lets you interact with your operating system and run programs, as well as automate tasks. It is installed on many devices from personal computers, servers, and embedded systems.

### MacOS and Linux
Chances are you already have Bash installed. You should be able to just open your terminal and be in Bash. If for some reason you aren't, you should be able to type `bash` and enter the shell.

### Windows
For Windows devices, you have a couple of options:
- SSH into another machine
- Install the [Windows Subsytem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
- Install [MinGW](http://mingw.org/) or [Cygwin](https://www.cygwin.com)
- You might have GitBash installed if you installed it when you install Git

## Basic Commands
To run a command on Bash, simply type it into the terminal and press Enter. Bash runs commands and programs out of a working directory. To find out what the current working directory is, run the `pwd` (Print Working Directory) command.

```
$ pwd
/home/usr/username
$
```

You can create files in a directory using the `touch` command. `touch` modifies a files timestamp. If the file exists, it will make the timestamp the current time. Otherwise, it creates the file.

```
$ touch file1
$
```

You can make subdirectories using the `mkdir` (MaKe DIRectory) command. This will create an empty directory at the path specified.

```
$ mkdir docs
$
```

You can see what is currently in the directory with the `ls` (LiSt) command.

```
$ ls
file1 docs
$
```

When you run a command, by default it runs as the user that is logged in (you). However, some commands require permissions to run. In order to escalate the priveleges for a certain command, use `sudo` (Super User DO).

```
$ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo apt-get install vim
[sudo] password for username:
...
$
```

> NOTE: When you use `sudo`, you are granting a command or program access to your computer. Make sure you trust commands that your un with `sudo`

If you don't know how to use a command, or need more information about how a command works, use `man` to bring up the manual for a command. This will open the manual in a new process. To return to the terminal window, press `Q`.

```
$ man ls
LS(1)                                         User Commands                                         LS(1)

NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

DESCRIPTION
```

## Command Parameters
Most commands take parameters. Each parameter is separated by a space. If you need a space inside a parameter, surround the parameter with quotes. There is a general format for command parameters. Take for example the following command:

```
$ ls -a -l --color=auto /var
```
The command is `ls`, and the parameters are what follow.
- `-a` is a _flag_ in _short form_ that tells `ls` to include hidden files
- `-l` is a _flag_ in _short form_ that tells `ls` to use a list forat for output
- `--color` is a _flag_ in _long form_ that tells `ls` what mode to use when coloring the text
- `=auto` is the parameter for a flag to say that when coloring, use automatic mode
- `/var` is the paramter that tells `ls` what directory it should list

## Wildcards
Most bash programs support wildcard characters. These characers take the place of a character or substring to match on, giving the user a way to specify to the program how it should search or match something.
- `*` Matches on any string, including an empty string. `*abc*` would match any string that contains "abc"
- `?` matches on any single character. `file?.txt` would match files like `file1.txt`, `file2.txt`, `file3.txt`, etc

This is useful for doing things in bulk:
```
$ git add *.java
```
Would add any java file in the project to staging

## History
Bash keeps track of a history of the commands that you have enterd during a session.  If you use the arrow keys, you can scroll up or down through the commands you have recently entered. This is useful for rerunning commands, or going back to fix mispelled commands:

```
$ gvv -o myProgramWithALongName myProgramWithALongName.c myProgramWithALongName.h
bash: gvv: command not found
*** Press up arrow key and fix command ***
$ gcc -o myProgramWithALongName myProgramWithALongName.c myProgramWithALongName.h
```

You can also search you history for a command. Simply press `Ctrl + R` and type the command you want to search for. Then use the arrow keys to scroll through your results.

You can use `!` to refer to commands in your history.
- `!!` Copies the last command you entered
- `!-3` Copies the command you ran 3 commands ago
- `!22` Copies the command at index 22 in your history

This is very useful for when you forget to use `sudo`
```
$ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
$ sudo !!
sudo apt-get install vim
[sudo] password for username:
...
$
```

At the end of your session, your bash history is flushed to the `~/.bash_history` file in your home directory.

## Piping and Streaming
Piping and Streaming lets you string together commands

### Piping
Piping allows you to take the output from one command and use it as the input to the next command. You can string together as many commands as you would like. Piping uses the `|` character.
```
$ cat log.txt | grep error
```
This line is useful in that instead of printing the entire log file to the console window, it outputs it to the `grep` command which filters out any lines that do not match the pattern. Therefore, the only lines you would see are lines that contain errors.

### Streaming
Streaming allows you to intercept input and output for a command and stream them to somewhere else like a file. Streaming uses the `<` and `>` characters.

```
$ netstat -anp > port_usage.txt
```
This will take the output from the `netstat` command and write it to a file called `port_usage.txt`

There are three standard streams that can be intercepted:
- 0 stdin - This stream is the input to the program that usually you unter in the console window
- 1 stdout - This stream is the output that would be written to the console window
- 2 stderr - This stream is any error output that usually is written to the console window

This allows you to do something like:
```
$ myProgram 0<input.txt 1>log.txt 2>errors.txt
```
In this case, the program is now reading from an input file and writing any log statements to the log file. However, when it encounters an error, it outputs that to an error file for easy aggregation.

## Variables and Aliases
Bash lets you write to an read from variables. Use `=` to set a variable. Spaces are not allowed, unless quotes are used
```
$ var=hello
$ echo $var
hello
$ var="hello world"
$ echo $var
hello world
$
```

You can also create aliases to commands
```
$ alias lsl='ls -l'
$ lsl
total 0
drwxrwxrwx 1 username username 4096 Oct  4 17:44 docs
-rwxrwxrwx 1 username username    0 Oct  4 17:44 file1
$
```
You can set environment variables to change the way bash looks:
```
$ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$'
```
You can also create a `.bashrc` script to customize your terminal. My `.bashrc` is included in this repo. It's the standard Ubuntu `.bashrc` with a few customizations.

## Scripting
(Coming Soon)

## Cool Tricks
`&&` and `||` let you break on failure or recover from failures.
```
$ ping nitron.se.rit.edu && ssh<EMAIL_ADDRESS>```
In this case, if the ping fails, then the ssh won't be attempted

```
rm file1 || rm ../file1
```
In this case, if the `rm` failed to delete `file1`, it tries again in the parent directory

`Ctrl + L` – Clears the screen

`Ctrl + U` – Clears your current input

Interpolation lets you run commands within a command:
```
ls $(cat directory.txt)
```
`Ctrl + C` – Kill current process
`Ctrl + Z` – Put process in background
`fg` – pulls process from the background to the foreground

## Resources
- [Bash Reference Manual](https://www.gnu.org/software/bash/manual/bash.html)
- [Learn X in Y Minutes](https://learnxinyminutes.com/docs/bash/) <- This has a lot more in depth scripting techniques
- [Codecademy Bash Walkthrough](https://www.codecademy.com/catalog/language/bash)

## Fun stuff
- [Bash one liners](http://www.bashoneliners.com/)
- [Web Server Written in Bash](https://github.com/avleen/bashttpd)
- [Bash Game](http://play.bash.academy/)

license: Unlicense

repository: smlevorse/BashTechTalk

gha_language: Shell

gha_license_id: Unlicense

repo_name: smlevorse/BashTechTalk


text:
# General Program Installer
Downloads and Installs - Firefox, Chrome, Office Apps, Adobe Reader DC

This was created to be simple and run from an RMM system to configure these programs on new PCs without having to babysit the download and installation of each one.
In my immediate testing, it takes about 20 minutes to run and install start to finish, this can vary by environment.

I have plans to add more to this script in the future, but updates will come when they come.

repository: TurnTheLydon/GeneralWKSTInstaller

branch_name: refs/heads/main

repo_name: TurnTheLydon/GeneralWKSTInstaller


text:
---
layout: default
---

# 1995-07-15 - Re: Anti-Electronic Racketeering Act of 1995 (fwd)

## Header Data

From: Carl Ellison<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 36c168b7cbd3d98ee4922950d8cd9c32a44475081d4dea742b7b38c512542906

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-07-15 00:16:05 UTC

Raw Date: Fri, 14 Jul 95 17:16:05 PDT

## Raw message

```
{% raw  %}From: Carl Ellison<EMAIL_ADDRESS>Date: Fri, 14 Jul 95 17:16:05 PDT
To<EMAIL_ADDRESS>Subject: Re: Anti-Electronic Racketeering Act of 1995 (fwd)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>Date: Thu, 13 Jul 95 11:19:29 -0400
>From: "Brian A. LaMacchia"<EMAIL_ADDRESS>

>>In the subsection that explicitly mentions crypto, it says that it's
>>unlawful to put (non-GAK) crypto on an open net, "regardless of whether such
>>software has been designated non-exportable". If the phrase "nonexportable"
>>means the same thing in the context of this subsection, then provision (b)
>>would only seem to apply RICO to stuff that already falls under ITAR.
>
>What worries me is the first sentence: "each act of distributing
>software is considered a predicate act."

The crypto section has no GAK exclusion.  It makes it as illegal to release
GAKed crypto on a net as PGP.

I believe that the concern about defining predicate acts this way comes
from the RICO requirement that there be TWO instances of a crime in order
to pass the test of perpetrating a *pattern of crime* and therefore be
ranked as a mobster subject to RICO.  My guess is that the intent is that
from one placement on an FTP server or one posting to a newsgroup, the
perpetrator of that heinous act will have passed his RICO qualification and
therefore be subject to having all he owns taken from him.

-------

Meanwhile, the Federal civil forfeiture fund goes to good things.  The last
$9M (I believe it was) went to buying up AT&T DES phones to be made into
Clipper phones.  Of course, the conversion hasn't happened yet and the DES
phones are sitting in a warehouse someplace -- but the $9M fund went to
really good use, saving the world from AT&T DES.

(sarcasm off)

+--------------------------------------------------------------------------+
|Carl M. Ellison<EMAIL_ADDRESS>  http://www.clark.net/pub/cme/home.html  |
|PGP: E0414C79B5AF36750217BC1A57386478 & 61E2DE7FCB9D7984E9C8048BA63221A2  |
|  ``Officer, officer, arrest that man!  He's whistling a dirty song.''    |
+----------------------------------------------------------- Jean Ellison -+

{% endraw %}
```

## Thread

+ Return to [July 1995](/archive/1995/07)

+ Return to "[Brian A. LaMacchia <bal@martigny.ai.mit.edu>](/authors/brian_a_lamacchia_bal_at_martigny_ai_mit_edu_)"
+ Return to "[Brian Davis <bdavis@thepoint.net>](/authors/brian_davis_bdavis_at_thepoint_net_)"
+ Return to "[Carl Ellison <cme@TIS.COM>](/authors/carl_ellison_cme_at_tis_com_)"

+ _Unknown thread root_
  + 1995-07-15 (Fri, 14 Jul 95 17:16:05 PDT) - Re: Anti-Electronic Racketeering Act of 1995 (fwd) - _Carl Ellison<EMAIL_ADDRESS>    + 1995-07-15 (Fri, 14 Jul 95 18:28:39 PDT) - [Re: Anti-Electronic Racketeering Act of 1995 (fwd)](/archive/1995/07/86c1f9cbb4b24be2a6126beb2c6c3f6f9de4495716c2dcb8c9600cdd4f8d6668) - _Brian A. LaMacchia<EMAIL_ADDRESS>    + 1995-07-16 (Sun, 16 Jul 95 10:31:39 PDT) - [Re: Anti-Electronic Racketeering Act of 1995 (fwd)](/archive/1995/07/34dadd29dfc749ad5053dbd7273d3914c04b7252601b80c9a0975c7606ac4245) - _Brian Davis<EMAIL_ADDRESS>      + 1995-07-17 (Mon, 17 Jul 95 08:09:20 PDT) - [Re: Anti-Electronic Racketeering Act of 1995 (fwd)](/archive/1995/07/24b9b9cb2d5bd7363145d8d840d2e9913756865c84d65934806065feab279752) - _Carl Ellison<EMAIL_ADDRESS>

gha_license_id: MIT


text:
---
layout: page-fullwidth
subheadline: "Biography"
permalink: "/irene-adema/"
header: no
---

 Irene Adema (BSc)

I hold a bachelors degree in Biomedical Science and Technology from Maseno University.
Since joining the Virus Epidemiology and Control Group in 2014 as an assistant research officer, I have been involved in coordinating the DECIDE Kenya project specifically
designing and setting up field studies collecting data on community social contact patterns which could lead to infection transmission.
This data is important to parameterize models aimed at determining the impact of demographic changes on infectious disease transmission.

I am also part of the group working on the SPReD project aimed at defining the pathways of respiratory virus transmission, particularly involved in studies investigating the role and importance of schools and households in transmission of respiratory viruses.

Before joining the programme, I participated in both laboratory and population based research projects.
My interests are in epidemiology and I aspire to acquire advanced training to refine and complement skills that I have developed in order to understand the dynamics of infectious diseases transmission in low income settings.

gha_language: CSS


text:
# Solved by Flexbox

[View Site](https://philipwalton.github.io/solved-by-flexbox/)

To get this to recompile with new components simply:

`
npm install
npm install -g gulp
gulp css
`

And commit the main.css which is referenced in our build for the holy grail layout

repository: davidrenne/asdineStormRocks

repo_name: davidrenne/asdineStormRocks


text:
# Sonar Scanning

> Sonarqube is a tool that performs static code analysis. It looks for pitfalls in coding and reports them. It's great tool for catching vulnerabilities!

## Task

![task-sonar](./images/task-sonar.png)

## Deploy Sonarqube using GitOps

1. Create a SealedSecrets in our git repository for the Sonarqube admin user _(yes, because it is GitOps!)_ so that the deployment and pipeline can leverage the secret when executing.

    ```bash
    cat << EOF > /tmp/sonarqube-auth.yaml
    apiVersion: v1
    data:
      username: "$(printf admin | base64 -w0)"
      password: "$(printf admin123 | base64 -w0)"
      currentAdminPassword: "$(printf admin | base64 -w0)"
    kind: Secret
    metadata:
      labels:
        credential.sync.jenkins.openshift.io: "true"
      name: sonarqube-auth
    EOF
    ```

2. Just as before, use `kubeseal` command line to seal the secret definition just created.

    ```bash
    kubeseal < /tmp/sonarqube-auth.yaml > /tmp/sealed-sonarqube-auth.yaml \
        -n ${TEAM_NAME}-ci-cd \
        --controller-namespace do500-shared \
        --controller-name sealed-secrets \
        -o yaml
    ```

    We want to grab the results of this sealing activity, in particular the `encryptedData`.

    ```bash
    cat /tmp/sealed-sonarqube-auth.yaml| grep -E 'username|password|currentAdminPassword'
    ```

    The output should look like this with massively long nonsense strings:

        username: AgAj3JQj+EP23pnzu...
        password: AgAtnYz8U0AqIIaqYrj...
        currentAdminPassword: AgAtnYz8U0AqIIaqYrj...

3. Open up `ubiquitous-journey/values-tooling.yaml` file and extend the Sealed Secrets entry. Copy the output of `username`, `password` and `currentAdminPassword` from the previous command and update the values. Make sure you indent the data correctly.

    ```yaml
            - name: sonarqube-auth
              type: Opaque
              labels:
                credential.sync.jenkins.openshift.io: "true"
              data:
                username: AgAj3JQj+EP23pnzu...
                password: AgAtnYz8U0AqIIaqYrj...
                currentAdminPassword: AgCHCphbYpeLYMPK...
      ```

    and push the changes:

    ```bash
    cd /projects/tech-exercise
    git add ubiquitous-journey/values-tooling.yaml
    git commit -m  "🍳 ADD - sonarqube creds sealed secret 🍳"
    git push
    ```

If you get an error like error: failed to push some refs to.., please run git pull, then push your changes again by running above commands.

4. Verify that you have the secret definition available in the cluster by checking the UI or on the terminal:

    ```bash
    oc get secrets -n <TEAM_NAME>-ci-cd | grep sonarqube-auth
    ```

5. Install **Sonarqube**, the code quality tool. Edit `ubiquitous-journey/value-tooling.yaml` file in your IDE  and add to the `applications` list:

    ```yaml
      # Sonarqube
      - name: sonarqube
        enabled: true
        source: https://redhat-cop.github.io/helm-charts
        chart_name: sonarqube
        source_ref: "0.0.16"
        values:
          account:
            existingSecret: sonarqube-auth
          initContainers: true
          plugins:
            install:
              - https://github.com/checkstyle/sonar-checkstyle/releases/download/8.40/checkstyle-sonar-plugin-8.40.jar
              - https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/2.0.8/sonar-dependency-check-plugin-2.0.8.jar
    ```

6. Git add, commit, push your changes (GITOPS WOOOO 🪄🪄).  Connect to Sonarqube UI to verify if the installation is successful (username `admin` & password `admin123`):

    ```bash
    echo https://$(oc get route sonarqube --template='{{ .spec.host }}' -n ${TEAM_NAME}-ci-cd)
    ```

    ![sonary-alive](./images/sonary-alive.png)

    Now that we have the tool deployed ...

#### In your groups pick the tool you'd like to integrate the pipeline with:

| 🐈⬛ **Jenkins Group** 🐈⬛  |  🐅 **Tekton Group** 🐅 |
|-----------------------|----------------------------|
| * Configure your pipeline to run code analysis | * Configure your pipeline to run code analysis |
| * Configure your pipeline to check the quality gate | * Configure your pipeline to check the quality gate |
| * Improve your application code quality | * Improve your application code quality |
| [jenkins](3-revenge-of-the-automated-testing/1a-jenkins.md) | [tekton](3-revenge-of-the-automated-testing/1b-tekton.md) |

repository: jackroberts-gh/tech-exercise

repo_name: jackroberts-gh/tech-exercise


text:
# GeoMesa NiFi

GeoMesa-NiFi allows you to ingest data into GeoMesa using the NiFi dataflow framework. Currently, the following
data stores are supported:

* Accumulo
* HBase
* Kafka
* FileSystem (HDFS, S3)
* Redis
* Arbitrary GeoTools data stores (e.g. Postgis)

# Building from Source

To build, simply clone and build with maven:

```bash
git clone git@github.com:geomesa/geomesa-nifi.git
cd geomesa-nifi
mvn clean install
```

## Dependency Versions

The nar contains bundled dependencies. To change the dependency versions, modify the version properties
(`<hbase.version>`, etc) in the `pom.xml` before building.

# Installation

To install the GeoMesa processors you will need to copy the nar files into the `lib` directory of your
NiFi installation. There are currently three nar files:

* `geomesa-nifi-controllers-api-nar-$VERSION.nar`
* `geomesa-nifi-controllers-nar-$VERSION.nar`
* `geomesa-nifi-processors-nar-$VERSION.nar`

For convenience, they are bundled into a `tar.gz` file, which is available through the
[GitHub Releases](https://github.com/geomesa/geomesa-nifi/releases) page or under
`geomesa-nifi-dist/target/geomesa-nifi-$VERSION-dist.tar.gz` after building from source.

For example, to download and install the nars from GitHub:

```bash
wget "https://github.com/geomesa/geomesa-nifi/releases/download/geomesa-nifi-$VERSION/geomesa-nifi-$VERSION-dist.tar.gz"
tar -xf geomesa-nifi-$VERSION-dist.tar.gz --directory $NIFI_HOME/lib/
````

Or, to install the nars after building from source:

```bash
tar -xf geomesa-nifi-dist/target/geomesa-nifi-$VERSION-dist.tar.gz --directory $NIFI_HOME/lib/
````

## Upgrading

In order to upgrade, replace the nar files with the latest versions. For version-specific changes,
see [Upgrade Guide](#upgrade-guide).

# Processors

This project provides the following processors:

* ``PutGeoMesaAccumulo`` - Ingest data into GeoMesa Accumulo
* ``PutGeoMesaHBase`` - Ingest data into GeoMesa HBase
* ``PutGeoMesaKafka`` - Ingest data into GeoMesa Kafka
* ``PutGeoMesaFileSystem`` - Ingest data into a distributed file system like HDFS, S3 or WASB
* ``PutGeoMesaRedis`` - Ingest data into GeoMesa Redis
* ``PutGeoTools`` - Ingest data into an arbitrary GeoTools Datastore
* ``ConvertToGeoAvro`` - Use a GeoMesa converter to create GeoAvro

## Common Processor Configurations

All geomesa-nifi processors share some common configuration properties, that define how input data is converted
into GeoTools SimpleFeatures for ingest. To use a processor, first add it to the workspace and open the properties
tab of its configuration. Common properties are as follows:

Property                  | Description
---                       | ---
Mode                      | Ingest arbitrary files with `Converter` mode, or GeoAvro with `Avro` mode
SftName                   | The SimpleFeatureType to use, if the SimpleFeatureType is already on the classpath (see below). Takes precedence over `SftSpec`
SftSpec                   | Define a SimpleFeatureType via TypeSafe config or GeoTools specification string
FeatureNameOverride       | Override the SimpleFeatureType name
ConverterName             | The converter to use, if the converter is already on the classpath (see below). Takes precedence over `ConverterSpec`
ConverterSpec             | Define a converter via TypeSafe config
ConverterErrorMode        | Override the converter error mode (`skip-bad-records` or `raise-errors`)
BatchSize                 | The number of flow files that will be processed in a single batch
FeatureWriterCaching      | Enable caching of feature writers between flow files, useful if flow files have a small number of records (see below)
FeatureWriterCacheTimeout | How often feature writers will be flushed to the data store, if caching is enabled

### Feature Writer Caching

Feature writer caching can be used to improve the throughput of processing many small flow files. Instead of a new
feature writer being created for each flow file, writers are cached and re-used between operations. If a writer is
idle for the configured timeout, then it will be flushed to the data store and closed.

Note that if feature writer caching is enabled, features that are processed may not show up in the data store
immediately. In addition, any features that have been processed but not flushed may be lost if NiFi shuts down
unexpectedly. To ensure data is properly flushed, stop the processor before shutting down NiFi.

Alternatively, NiFi's built-in `MergeContent` processor can be used to batch up small files.

### Defining SimpleFeatureTypes and Converters

The GeoMesa NiFi processors package a set of predefined SimpleFeatureType schema definitions and GeoMesa
converter definitions for popular data sources such as Twitter, GDelt and OpenStreetMaps.

The full list of provided sources can be found in the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/convert/premade/index.html).

For custom data sources, there are two ways of providing custom SFTs and converters:

#### Providing SimpleFeatureTypes and Converters on the Classpath

To bundle configuration in a jar file simply place your config in a file named ``reference.conf`` and place it **at
the root level** of a jar file:

```bash
jar cvf data-formats.jar reference.conf
```

You can verify your jar was built properly:

```bash
$ jar tvf data-formats.jar
     0 Mon Mar 20 18:18:36 EDT 2017 META-INF/
    69 Mon Mar 20 18:18:36 EDT 2017 META-INF/MANIFEST.MF
 28473 Mon Mar 20 14:49:54 EDT 2017 reference.conf
```

Add the jar file to `$NIFI_HOME/lib` to make it available on the classpath.

##### Defining SimpleFeatureTypes and Converters via the UI

You may also provide SimpleFeatureTypes and Converters directly in the Processor configuration via the NiFi UI.
Simply paste your TypeSafe configuration into the ``SftSpec`` and ``ConverterSpec`` property fields.

## PutGeoMesaAccumulo

The ``PutGeoMesaAccumulo`` processor is used for ingesting data into an Accumulo-backed GeoMesa data store. In
addition to the common properties defined above, it requires properties for connecting to Accumulo. See the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/accumulo/usage.html#accumulo-data-store-parameters)
for a description of the data store parameters.

### GeoMesa Configuration Service

The ``PutGeoMesaAccumulo`` plugin supports [NiFi Controller Services](https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#Controller_Services)
to manage common configurations. This allows the user to specify a single location to store the Accumulo connection parameters.
This allows you to add new processors without having to enter duplicate data.

To add the ``AccumuloDataStoreConfigControllerService`` access the ``Contoller Settings`` from NiFi global menu and navigate to the
``ControllerServices`` tab and click the ``+`` to add a new service. Search for the ``AccumuloDataStoreConfigControllerService``
and click add. Edit the new service and enter the appropriate values for the properties listed.

After configuring the service, select the appropriate service in the ``GeoMesa Configuration Service`` property
of your processor. When a controller service is selected the ``accumulo.zookeepers``, ``accumulo.instance.id``,
``accumulo.user``, ``accumulo.password`` and ``accumulo.catalog`` parameters are not required or used.

## PutGeoMesaHBase

The ``PutGeoMesaHBase`` processor is used for ingesting data into an HBase-backed GeoMesa data store. In
addition to the common properties defined above, it requires properties for connecting to HBase. See the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/hbase/usage.html#hbase-data-store-parameters)
for a description of the data store parameters.

HBase generally requires an `hbase-site.xml` file to be on your classpath, in order to connect to your cluster.
The `PutGeoMesaHBase` processor provides two options to avoid this: you can use the `hbase.config.paths` property
to point to a file on the local file system, HDFS or S3, or you can simply paste the `<configuration>` into
the `hbase.config.xml` property.

## PutGeoMesaKafka

The ``PutGeoMesaKafka`` processor is used for ingesting data into a Kafka-backed GeoMesa data store. In
addition to the common properties defined above, it requires properties for connecting to Kafka. See the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/kafka/usage.html#kafka-data-store-parameters)
for a description of the data store parameters.

## PutGeoMesaFileSystem

The ``PutGeoMesaFileSystem`` processor is used for ingesting data into a file-system-backed GeoMesa data store. In
addition to the common properties defined above, it requires properties defining the file system. See the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/filesystem/usage.html#filesystem-data-store-parameters)
for a description of the data store parameters.

## PutGeoMesaRedis

The ``PutGeoMesaRedis`` processor is used for ingesting data into a Redis-backed GeoMesa data store. In
addition to the common properties defined above, it requires properties for connecting to Redis. See the
[GeoMesa documentation](https://www.geomesa.org/documentation/user/redis/usage.html#redis-data-store-parameters)
for a description of the data store parameters.

## PutGeoTools

The ``PutGeoTools`` processor is used for ingesting data into a GeoTools compatible data store. In
addition to the common properties defined above, it requires properties for connecting to the data store.

The `DataStoreName` property should match to the display name of the data store to use, for example `PostGIS`
to use a PostGIS data store. Additional data store parameters for the specific data store you are using can be
specified through NiFi dynamic properties.

Note that the dependencies for the requested data store must be available on the NiFi classpath.

## ConvertToGeoAvro

The ``ConvertToGeoAvro`` processor leverages GeoMesa's internal converter framework to convert features into Avro
and pass them along as a flow to be used by other processors in NiFi.

# Upgrade Guide

## 2.4.x

The GeoMesa processors have been refactored to support NiFi nar inheritance and as a first step towards supporting
Java 11. Any existing processors will continue to work under the older version, as long as you don't delete the old
GeoMesa nar file. However, you will need to create new processors in order to upgrade to 2.4.x.

## 1.3.x to 1.4.x

The `PutGeoMesaKafka_09` and `PutGeoMesaKafka_10` processors have been merged into a single `PutGeoMesaKafka`
processor that will work with both Kafka 09 and 10.

The configuration parameters for the following processors have changed:

* ``PutGeoMesaAccumulo``
* ``PutGeoMesaHBase``
* ``PutGeoMesaKafka``

See [Processors](#processors) for more details.

# NiFi User Notes

NiFi allows you to ingest data into GeoMesa from every source GeoMesa supports and more. Some of these sources can be tricky to setup and configure.
Here we detail some of the problems we've encountered and how to resolve them.

## GetHDFS Processor with Azure Integration

It is possible to use the [Hadoop Azure Support](https://hadoop.apache.org/docs/current/hadoop-azure/index.html) to access Azure Blob Storage using HDFS.
You can leverage this capability to have the GetHDFS processor pull data directly from the Azure Blob store. However, due to how the GetHDFS processor was
written, the ``fs.defaultFS`` configuration property is always used when accessing ``wasb://`` URIs. This means that the ``wasb://`` container you want the
GetHDFS processor to connect to must be hard coded in the HDFS ``core-site.xml`` config. This causes two problems. Firstly, it implies that we can only
connect to one container in one account on Azure. Secondly, it causes problems when using NiFi on a server that is also running GeoMesa-Accumulo as
the ``fs.defaultFS`` property needs to be set to the proper HDFS master NameNode.

There are two ways to circumvent this problem. You can maintain a ``core-site.xml`` file for each container you want to access but this is not easily scalable
or maintainable in the long run. The better option is to leave the default ``fs.defaultFS`` value in the HDFS ``core-site.xml`` file. We can then leverage
the ``Hadoop Configuration Resources`` property in the GetHDFS processor. Normally you would set the ``Hadoop Configuration Resources`` property
to the location of the ``core-site.xml`` and the ``hdfs-site.xml`` files. Instead we are going to create an additional file and include it last in the
path so that it overwrites the value of the ``fs.defaultFS`` when the configuration object is built. To do this simply create a new xml file with an appropriate
name (we suggest the name of the container). Insert the ``fs.defaultFS`` property into the file and set the value.

```xml
<configuration>
    <property>
        <name>fs.defaultFS</name>
<EMAIL_ADDRESS>    </property>
</configuration>
```

Reference
---------

For more information on setting up or using NiFi see the [Apache NiFi User Guide](https://nifi.apache.org/docs/nifi-docs/html/user-guide.html)

repository: mbrukman/geomesa-nifi

repo_name: mbrukman/geomesa-nifi


text:
## 0.0.3 (2014-11-11)

### Summary

Updates documentation and a hack bug fix for the "Database is locked" issue
after initial application installation.

#### Bug fixes

- Hack workaround for the "Database is locked" issue.  See `graphite_apache.pp`
  for ugly details.

## 0.0.2 (2014-11-06)

### Summary

Initial release of usable code


text:
# Bug Reporting Document

## Date of Bug
- YYYY-MM-DD

## Description of BUG
- Please describe what is happening in the application

## Contact Information
- Please provideyour email so that we may contact you if we need more information about the bug you found.

repository: rstevensonUSGS/community-starter-kit

repo_name: rstevensonUSGS/community-starter-kit


text:
# Power-Read-More
jQuery based easy to implement content expander.
https://github.com/v4iv/Power-Read-More

Instructions:

- import jQuery, prm-min.js and prm-min.css in your webpage
- change the number of characters to be displayed by default in prm-min.js (by default it is 1000 characters)
- wrap the text under div(class powerreadmore)
- and that's it!

* For Reference See : index.html

Follow Me - https://twitter.com/vaibhaved


text:
# Additional Information

This page defines links and references for additional reading.

- [Refract](https://github.com/refractproject/refract-spec) - Basis for API Elements' structure
- [API Blueprint](https://apiblueprint.org/) - API description format that utilizes API Elements as its parsing results
- [MSON](https://github.com/apiaryio/mson) - Data structure format that utilizes API Elements as its parsing results (see the Data Structure Elements)

repository: smizell/api-elements

repo_name: smizell/api-elements


text:
# Github issue submitter

This extension is not affiliated with Github.

Chrome extension allows users to quickly submit Github issues to their repositories and include the page source and a screen capture.

Please fork!

# Features

  * Authenticate via Oauth
  * Assign issue to a repository member
  * Attach the page source (HTML) and URL of current tab
  * Attach a screenshot of the current tab

# Compatibility

This extension has only been tested on Mac OS X.

# Acknowledgements

This extension relies on an awesome blog post about using Oauth2 with Chrome extensions. http://smus.com/oauth2-chrome-extensions

This screen capture library was borrowed from the chrome-screen-capture project: http://code.google.com/p/chrome-screen-capture/ which uses a BSD style license: http://www.opensource.org/licenses/bsd-license.php

repository: cambridgemike/agile-testing-extension

extension: markdown

repo_name: cambridgemike/agile-testing-extension


text:
# guice-sample

Google Guice Dependency Injection sample code

## How to build/run

```bash
$ gradle run
```

```bash
$ gradle test
```

## Reference

* https://github.com/google/guice/wiki
* https://www.baeldung.com/guice


text:
---
layout: post
title: "Image Posterization Using Fuzzy Logic and Bilateral Filter"
date: 2018-02-03 17:57:22
categories: arXiv_CV
tags: arXiv_CV Face Detection Face_Detection
author: Mahmoud Afifi
mathjax: true
---

* content
{:toc}

##### Abstract
Image posterization is converting images with a large number of tones into synthetic images with distinct flat areas and a fewer number of tones. In this technical report, we present the implementation and results of using fuzzy logic in order to generate a posterized image in a simple and fast way. The image filter is based on fuzzy logic and bilateral filtering; where, the given image is blurred to remove small details. Then, the fuzzy logic is used to classify each pixel into one of three specific categories in order to reduce the number of colors. This filter was developed during building the Specs on Face dataset in order to add a new level of difficulty to the original face images in the dataset. This filter does not hurt the human detection performance; however, it is considered a hindrance evading the face detection process. This filter can be used generally for posterizing images, especially those have a high contrast to get images with vivid colors.

##### Abstract (translated by Google)
图像拼版是将具有大量色调的图像转换为具有明显的平坦区域和较少数量的色调的合成图像。在这份技术报告中，我们介绍了使用模糊逻辑的实现和结果，以便以简单快速的方式生成一个张贴的图像。图像滤波器基于模糊逻辑和双边滤波;在哪里，给定的图像模糊，以消除小细节。然后，使用模糊逻辑将每个像素分类为三个特定类别之一，以减少颜色的数量。这个过滤器是在构建人脸数据集时建立的，为数据集中的原始人脸图像增加了一个新的难度。这个过滤器不会伤害人的检测性能;然而，这被认为是避开人脸检测过程的障碍。这个过滤器通常可以用于二维图像的后处理，尤其是那些具有高对比度的图像以获得具有鲜明颜色的图像。

##### URL
[http://arxiv.org/abs/1802.01009](http://arxiv.org/abs/1802.01009)

##### PDF
[http://arxiv.org/pdf/1802.01009](http://arxiv.org/pdf/1802.01009)


text:
# mkcert
mkcert run in Docker

Docker image of https://github.com/FiloSottile/mkcert

# Usage

Basic usage

```
$ docker run mypaceshun/mkcert
```

Static .local directory

```
$ docker run -v "/your/favorite/path:/home/linuxbrew/.local:rw" mypaceshun/mkcert -install
```

Generate certificate file in your current directory

```
$ docker run -v "/your/favorite/path:/home/linuxbrew/.local:rw" -v "`pwd`:/home/linuxbrew/mkcert:rw" mypaceshun/mkcert localhost
```

repository: mypaceshun/mkcert

repo_name: mypaceshun/mkcert


text:
---
title: sampleOption()
---

```js
Pattern pattern.sampleOption(string option)
```

Samples an option by drafting variations of the pattern while adapting the option's value.

The exact behavior depends on [the type of option](/config#options):

The goal of option sampling is to verify the impact of an option on the pattern, and verify that
its min and max boundaries are correct and its default value is sensible.

 - For options that are an object with a **min** and **max** property, 10 steps will be sampled, between min and max
 - For options that are a numeric value (**constants**), 10 steps will be sampled between 90% and 110% of the value
 - For options with a **list** of options, each option in the list will be sampled

```js
import freesewing from "@freesewing/core"
import aaron from "@freesewing/aaron"
import models from "@freesewing/models"

let pattern = new aaron({
  settings: {
    embed: true,
    measurements: models.manSize38
  },
})

let svg = pattern.sampleOption("necklineDrop").render()
```

repository: freesewing/markdown

branch_name: refs/heads/develop

repo_name: freesewing/markdown


text:
# 2048-AI

[![Build Status](https://travis-ci.org/xwjdsh/2048-ai.svg?branch=master)](https://travis-ci.org/xwjdsh/2048-ai)
[![Go Report Card](https://goreportcard.com/badge/github.com/xwjdsh/2048-ai)](https://goreportcard.com/report/github.com/xwjdsh/2048-ai)
[![](https://images.microbadger.com/badges/image/wendellsun/2048-ai.svg)](https://microbadger.com/images/wendellsun/2048-ai "Get your own image badge on microbadger.com")
[![DUB](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/xwjdsh/2048-ai/blob/master/LICENSE)

AI for the 2048 game, implements by expectimax search, powered by Go.

The web front-ends of 2048 game was forked from [gabrielecirulli/2048](https://github.com/gabrielecirulli/2048), respect and gratitude!

## Screenshot
![](https://raw.githubusercontent.com/xwjdsh/2048-ai/master/screenshot/2048-ai.jpg)

## How to run?

## Related

* [Expectimax search ](https://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwiVrsfmiojXAhWExbwKHa6GAuYQFgg3MAI&url=https%3A%2F%2Fweb.uvic.ca%2F~maryam%2FAISpring94%2FSlides%2F06_ExpectimaxSearch.pdf&usg=AOvVaw0pjG10MxUtkBvM-mvRNlew)
* [Model weight matrix](https://codemyroad.wordpress.com/2014/05/14/2048-ai-the-intelligent-bot/)
* Communication by websocket, implements by [gorilla/websocket](https://github.com/gorilla/websocket)

## Licence

[MIT License](https://github.com/xwjdsh/2048-ai/blob/master/LICENSE)

gha_language: Go


text:
# multiverse-reader

**Note: This project is under active development**

Web based comic book reader (cbr/cbz) and library server. Built with React and GraphQL on top of Parcel and Serverless.

## Getting started for local development

Install the dependencies: `yarn`

Copy the example environment variables files: `cp packages/multiverse-reader-server/env.yml.example packages/multiverse-reader-server/env.yml`

Modify the environment: `vi packages/multiverse-reader-server/env.yml`

Start the client and server: `yarn start`

repository: TimMikeladze/multiverse-reader

repo_name: TimMikeladze/multiverse-reader


text:
# CSV to JSON

This app converts CSV to JSON using Floyd Hightower's [CSV to JSON](https://gitlab.com/fhightower/csv-to-json) package.

For example, this:

```
foo,bar
1,2
```

Becomes this:

```
[{'a': 'foo', 'b': 'bar'}, {'a': '1', 'b': '2'}]
```

Or you can specify a row of the CSV to be used as the keys for the CSV. For example, the output below shows what happens when the `heading_row` is set to zero:

```
[{'foo': '1', 'bar': '2'}]
```

## Release Notes

### 0.1.0

* Initial Release

gha_language: Python


text:
+++
title = "Three Weeks in Veloren 210"
description = "Birds on shoulders"

date = 2023-05-15
weight = 0
slug = "devblog-210"

[extra]
banner = "https://cdn.discordapp.com/attachments/634860358623821835/1104822048615837856/screenshot_1661064547493.png"

[taxonomies]
tags = ["devblog"]
+++

These weeks, Adlet dungeons and pets-on-shoulders were merged. The toolchain received an update and the server infrastructure was reworked.

\- Christof, TWiV Contributor

# Contributor Work

Thanks to last three weeks' contributors @Isse, @walpo, @Amaiolamo, @tygyh, @xMAC94x, @Terraaaagd, @DaforLynx, @zesterer, @hannibal, @imbris, @Vitalya, @Corvella, @Sam,
@vasco, @maxicarlos08.

The merged work includes translations, dependency updates, music updates, balancing, subtitles, server start optimization, dual sword skills, terrain persistance optimization, and sittable sprites.

Ongoing (unmerged) work is happening on dwarven quarry, axe skills, plant creatures, seachapel rework, coastal towns, plugins, economy, pet commands, world generation, rtsim timescale, and many many more others.

Link to the weekly meeting minutes: [~~April 29th~~](https://hackmd.io/@veloren/SkvgnRqXn), [May 6th](https://hackmd.io/@veloren/Bk1vwA7E3) and [13th](https://hackmd.io/@veloren/BJ7167pN3).

# Audio subtitles by @Isse

{{video(src="https://cdn.discordapp.com/attachments/1100789221851152465/1100854029090820136/2023-04-26_20-37-41.mp4", caption="Audio subtitles (lower right)")}}

# More complex patterns on blocks

@zesterer has implemented material specific shaders, a very early prototype looks like this. This is promising interesting visual options for the future.

{{img(src="https://cdn.discordapp.com/attachments/523568428905398283/1107442026343059576/screenshot_1684105141638.png")}}

# New animations

by @floppy

[{{img(src="/video-thumbs/V210_bushly.jpg")}}](https://streamable.com/80qv4h)
[{{img(src="/video-thumbs/V210_irrwurz.jpg")}}](https://streamable.com/hb3v2h)

and by @Lowis

{{video(src="https://cdn.discordapp.com/attachments/851517587337773056/1107410676303011900/20230514-2052-07.4647881.mp4")}}

# Party map progress by @Hannibal

{{img(src="https://cdn.discordapp.com/attachments/449660795857403905/1100505782660890814/snap2023-04-25-15-35-58.png")}}
{{img(src="https://cdn.discordapp.com/attachments/449660795857403905/1101219637833760848/snap2023-04-27-14-53-12.png")}}

# More screen shots from the game

{{img(src="https://cdn.discordapp.com/attachments/634860358623821835/1105715456297406534/screenshot_1683692146149.png")}}

{{img(src="https://cdn.discordapp.com/attachments/634860358623821835/1104783685657571349/image.png")}}

{{img(src="https://media.discordapp.net/attachments/634860358623821835/1104821046760190142/image.png")}}

{{
    img(src="https://cdn.discordapp.com/attachments/634860358623821835/1104198221217149009/screenshot_1683322048996.png",
    caption="Is it going to rain soon? See you next week!")
}}

{{ support() }}

repository: veloren/site

repo_name: veloren/site


text:
## v0.2.2 (2015-06-12)

Improved scrolling behavior with webkit. Sometimes, when using some point or touch devices
whole page was scrolled to the bottom, even though the scroll event was emit from the list
view.

Removed unecessary topItem in favor of padding of the first item. Also, styles need not to
be passed down to the list item view.

Thanks crudo!

## v0.2.1 (2015-06-03)

Added MIT license and repository config to package.json. Thanks cesarandreu!

## v0.2.0 (2015-06-02)

`numOfVisibleItems` parameter was removed in favor of `height`. See README.md and `example.jsx`
for more details. Basically, the whole list height is more convenient to use and often specified
by UX ppl in advance. Number of visible items are calcualted based on `height` and `itemHeight`
by the component itself.

## v0.1.1 (2015-06-01)

Code is simplified. Browser umd header is fixed to provide correct react dependency.

## v0.1.0 (2015-06-01)

react-infinite-list got serious. Upgraded to React 13. Webpack was introduced for convenient
development. Targets are built for node and browser worlds.

repository: michalweiser/react-infinite-list

repo_name: michalweiser/react-infinite-list


text:
# Lecidea kochiana var. lygaea (Ach.) Leight. VARIETY

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
Lich. -Fl. Great Brit. 282 (1871)

#### Original name
Lecidea lygaea Ach.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Lecanoromycetes/Umbilicariales/Fuscideaceae/Fuscidea/Fuscidea lygaea/ Syn. Lecidea kochiana lygaea/README.md

repo_name: mdoering/backbone


text:
Mechanical4
===========

Mechanical4
----------------
A small "bag of tricks", commonly used in other Mechanical4 libraries.

Mechanical4.EventQueue
----------------------
A simple event queue / message bus implementation. It's two main features are that it is strongly typed (string event identifiers are possibly, but discouraged), and that - with a minor bit of work - events can be serialized.

How you can use them
--------------------

### NuGet
Currently not available, sorry.

### Building
Use Visual Studio Community 2017.

### License
MIT (unless otherwise stated)


text:
# Morchella patula Pers., 1801 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syn. meth. fung. (Göttingen) 2: 619 (1801)

#### Original name
Morchella patula Pers., 1801

### Remarks
null


text:
 About •
 Functionalities •
 Layout •
 Preview •
 Running Locally •
 Technologies •
 License

## 💻 About the project

Project built during the **NLW #2- Next Level Week 2**, which is a brazilian programming event hosted by [Rocketseat](https://nextlevelweek.com/episodios/discovery/1/edicao/2).
The NLW is an online coding experience, with lots of practice, chalenges and tips. All the event happens during one week, after that, the content is removed from the Rocketseat website.

👨🏫 Proffy - This project is a tribute to all brazilian teachers that had their special holiday in the week that the project was developed. Proffy is a platform that has the mission to connect teachers and students of all subjects.

To me, this project had a special mission in the reinforcement of the front-end development basis, specially with HTML/CSS.

---

## ⚙ Functionalities

- [x] Teachers can sign up with a form which they complete their data:
  - [x] name and last name
  - [x] photo
  - [x] whatsapp number
  - [x] biography
  - [x] subject
  - [x] cost of its hour
  - [x] avaliable schedule

- [x] Students can search for teachers and:
  - [x] filter by subject, weekday and hour
  - [x] get in touch directly in the teacher whatsapp number

---

## 🎨 Layout

### Web

### Mobile

---

## 📺 Preview

---

## 🚀 Running the project locally

This project is divided in:
1. [Frontend](/src/views/pages)
2. [Backend](/src/server.js)
3. [Database](/src/database)

### Requirements

* [Git](https://git-scm.com)
* [Node.js](https://nodejs.org/en/)

#### 🎲 Running it

```bash

# Clone this repo
$ git clone https://github.com/K-Schaeffer/NLW-2.git

# Access the project folder from the command prompt
$ cd NLW-2

# Install all dependencies
$ npm install

# Execute the "dev" script
$ npm run dev

# Soon the project will start in the port: 3000 - open http://localhost:3000

```

Opcionally, you may want to have a clean database, therefore:

```bash

# Delete the database.sqlite file
$ rm -r src/database/database.sqlite

# Execute the file which creates all tables
$ node src/database/db.js

```

After that, just run the project, register teachers, and search for them :)

---

## 🛠 Technologies

The following tools where used in the project development:

#### **Front-end**  ([HTML](https://developer.mozilla.org/pt-BR/docs/Web/HTML)  +  [CSS](https://developer.mozilla.org/pt-BR/docs/Web/CSS) + [JS](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript))

#### **Back-end**  ([NodeJS](https://nodejs.org/en/))

-   **[Express](https://expressjs.com/)**
-   **[Nunjucks](https://mozilla.github.io/nunjucks/)**
-   **[Nodemon](https://nodemon.io)**

> See the [package.json](./package.json) file

#### **Database**  ([Sqlite-Async](https://www.npmjs.com/package/sqlite-async))

#### **Useful tools**

-   Editor:  **[Visual Studio Code](https://code.visualstudio.com/)**  → Extensions:  **[SQLite](https://marketplace.visualstudio.com/items?itemName=alexcvzz.vscode-sqlite)**
-   Layout:  **[Figma](https://www.figma.com/)**  →  **[Layout (Proffy)](https://www.figma.com/file/GHGS126t7WYjnPZdRKChJF/Proffy-Web)**
-   Markdown:  **[EmojiCopy](https://www.emojicopy.com)**,  **[Markdown Emoji](https://gist.github.com/rxaviers/7360908)**
-   Badges:  **[Shields.io](https://shields.io)**

## 📝 License

This project is under the [MIT](./LICENSE) license.

---

Made with ❤ by Kauan Schaeffer 👋 Contact me :)


text:
# Changelog

## [0.1.0] - 01-10-2020
* Initial release.

## [0.1.1] - 01-10-2020
* Minor fixes.

## [0.1.2] - 01-10-2020
* email getter fix.

## [0.1.3] - 06-10-2020
* better support for typed telephones (typedTelephone getter).

## [0.1.4] - 12-10-2020
* Added support for gender property.
* Properties such as N and FN (Name and FormattedName) will not crash if it contains any parameters like CHARSET or TYPE.
* telephone getter is deprecated, typedTelephone should be used instead.
* fixed a bug where lowercase tags are not detected.

## [0.1.5] - 13-10-2020
* Minor bug fix.

## [0.1.6] - 13-10-2020
* Bug fixes.
* Added typedAdress and typedEmail getters.
* Added birthday, note and nickname getters.
* Added print_lines method.
* Deprecated email getter.


text:
This tool helps you keep to the 'red-green-refactor' (and more) pattern of commits when using [test-driven development](http://en.wikipedia.org/wiki/Test-driven_development) or [behaviour-driven development](http://en.wikipedia.org/wiki/Behavior-driven_development) and supports you in explaining the rationale for changes (as well as just listing them). The goal is to document the journey your code takes, and make the commit log informative and even fun to read.

Instead of using `git commit ...`, you'd issue `commit red`, `commit green`, and so on. You can provide a commit message if one's needed, and `git` will be called to make the commit. Best practices involving messages and line lengths are handled, and a 'notepad' is provided so you can keep notes on a commit as you work on it (but remember that taking small steps often is part of the Zen of TDD :-)).

![Graph of commit states (described below)](graph/commit-states.png)

(The central 'red-green-refactor' cycle is depicted \[in black\], with the additional commit types around the outside \[in slate blue\].)

Background
----------

In [test-driven development](http://en.wikipedia.org/wiki/Test-driven_development) and [behaviour-driven development](http://en.wikipedia.org/wiki/Behavior-driven_development) there are three main types of commits:

-   'red' after a failing test/part-test;
-   'green' when that test/part passes, and
-   'refactor' when changes are made to improve the code's quality along the lines of [DRY](http://en.wikipedia.org/wiki/Don't_repeat_yourself), the [single responsibility principle](http://en.wikipedia.org/wiki/Single_responsibility_principle) and other such guidelines.

Commits should alternate between 'red' and 'green', with optional (though highly-recommended) refactorings after a 'green' commit. It helps, particularly when performing a test-/behaviour-driven development kata, for the commit messages to tell a story (and for their summary lines to be clear and concise, so they can be quickly read). This tool makes it easy to format commit messages. (Note that 'green' commits do not need messages, as their purpose should be clear from the preceding 'red' commit.)

There are three additional types of commit (one is only used once per project):

-   'initial' is the first commit (and needs no message);
-   'merge' commits are used when bringing in commits from other branches or repositories, and
-   'beige' commits affect parts of the project that are outside the remit of TDD, such as (some) documentation and static assets -- do think carefully whether a green-red pattern would be more suitable, though!

Commit Messages
---------------

**Note:** this is not actually implemented yet ;-).

Commit messages have two parts:

-   A summary line that identifies the kind of commit (e.g. red or green) and, briefly, its nature.
-   An optional body, which provides more details.

Specify a summary on the command line:

    commit red 'sprocket should fit into widget'

This will translate into the following summary line for the commit under `git log`:

    RED Sprocket should fit into widget

Any command flags are passed through to `git`.

    commit -a green

You will be warned if the summary line exceeds 50 characters; if it exceeds 75 characters it will not be allowed.

You can write the body of the commit message in a 'CHANGES' file in the root of the repository. A good format for this file would be an explanation of the rationale behind the commit, or perhaps an asterisk-bulleted list of changes (though if the commit changes a lot in one go, it might be better to split it up).

The 'CHANGES' file is emptied after a successful commit, so you can start again.

### Example CHANGES files

It can be good for the body of the commit message to read in a narrative manner. For example, for the first test in a 'Noughts and Crosses' TDD kata, entitled ['RED Test that a legal move is legal
'](https://github.com/matatk/NoughtsAndCrosses/commit/9fd202591dd97031627da318a2706152aa4cf7c2), the following commit message body was used.

    We are aiming to write Noughts and Crosses using Keith Braithwaite's
    'Test-driven development as if you meant it' ethos.

    We are starting from the is_legal (to be) method, that checks the
    validity of a proposed move.  Our first test is somewhat contrived due
    to the restrictions of the process.

    It seems more natural to approach TDDAIYMI in a bottom-up, as opposed to
    to-down, manner.

Here's a fairly traditional CHANGES file:

    * Fix recurring issue with the chameleon circuit
    * Add extra stabilisation routine to flux capacitor

**Note:** the lines in the CHANGES file are not auto-wrapped; `git`'s suggested line length is 72 characters.

### Editor Auto-wrapping

If you are using Vim, you can set it up to provide line-wrapping at 72 characters for any file called 'CHANGES' by including the following in your vimrc.

```vim
autocmd BufNewFile,BufRead CHANGES set textwidth=72
```

It is also useful to ensure that spell-checking is enabled.

### Reference Information

-   There was some interesting information in this [StackOverflow question and answers on git commit message formatting](http://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting).

Development Environment Set-up
------------------------------

### First-time Setup

If you haven't got them, get **pip** and **virtualenv**

-   `sudo easy_install pip`
-   `pip install virtualenv`

Create and activate the virtual environment

-   `virtualenv .venv`
-   `. .venv/bin/activate`

Install/update packages

-   `pip install -r requirements.txt`
-   or `pip install --upgrade -r requirements.txt`

### Day-to-day Development

Activate the virtual environment and set the path for testing

-   `. .venv/bin/activate`
-   `export PYTHONPATH=.`

**Note:** if you have [autoenv](https://github.com/kennethreitz/autoenv), the virtualenv script will be automatically sourced when you enter the directory.

The tests can be run continuously with `py.test --looponfail tests` or `py.test -f tests`.

repository: matatk/tdd-bdd-commit

repo_name: matatk/tdd-bdd-commit


text:
### [CVE-2019-2118](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-2118)
![](https://img.shields.io/static/v1?label=Product&message=Android&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Information%20disclosure&color=brighgreen)

### Description

In various functions of Parcel.cpp, there are uninitialized or partially initialized stack variables. These could lead to local information disclosure with no additional execution privileges needed. User interaction is not needed for exploitation. Product: Android. Versions: Android-8.0 Android-8.1 Android-9. Android ID: A-130161842.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/hyrathon/trophies

repository: trickest/cve

repo_name: trickest/cve


text:
# Code sandbox

If you want to play around with unit testing without installing or bootstrapping a project, [here's a code sandbox template](https://codesandbox.io/s/roku-unit-testing-16c26?file=/tests/source/utils.test.brs) you can use.

repository: hulu/roca

gha_language: Brightscript

repo_name: hulu/roca


text:
---
title: Updating 1Password on OS X
date: "2019-02-04T15:17:47Z"
permalink: blog/s25/index.html
---

I noticed 1Password had not been updated in a while. The background helper is too quick to restart before the AppStore can finish the installation.

The fix is to "super quit" 1Password with command+option+control+q (⌘⌥⌃q).

gha_language: JavaScript


text:
Game: Snake for Raspberry Pi with 12864/SSD1306 in Python

### Demo
<img src="https://github.com/xswxm/Play-Snake-on-12864-SSD1306/blob/master/demo.JPG?raw=true"
alt="Demo" width="480" height="360" border="10" />

### Setting Up
Configure your 128464 by following this tutorial: https://learn.adafruit.com/ssd1306-oled-displays-with-raspberry-pi-and-beaglebone-black/usage?view=all

Edit the script. Replace the pins with yours
```python
# Ports used for fthe Display. You may have to change them to yours
RST = 25
DC = 24
```
More configuration. Change the values if you want
```python
# Configurations of this game
# You may check the preference below and alter the values if you want
display_interval = 0.05                # Refresh display every 0.05 second => FPS = 20
size = 2                               # Size of a snake, 2 means one point occupies four pixels (2x2)
# Initialize the boundary of the gaming area
area = (0, 0, disp.width*2/3/size-1, (disp.height-2)/size-1)    # Gameing area in points with size
boundary = (0, 0, (area[2]+1)*size+1, (area[3]+1)*size+1)       # Gameing boundary
boundary_cross = True                  # snake is able to cross the boundary
# Block setting
block_mode = False                     # Do not create blocks
# Initialize a snake
snake = []                             # snake
snake0 = (area[2]/2, area[3]/2)        # snake's head (first pixel)
snake1 = snake0                        # snake's tail (last pixel)
l = 4                                  # snake's length = 4
interval_max = 1
interval_min = 0.05
interval = interval_max                # move the snake every 1 second
direction = (1, 0)                     # direction = Right
food = snake0                          # normal food
food_score = 1                         # each food worth 1 score
sfood = ()                             # initialize a empty special food
sfood_lifetime = 10                    # special food exists for 10 seconds
sfood_count = 0                        # to count the time of the special food
sfood_interval = 0.25                  # refresh the special food every 0.25 second
sfood_time = 30                        # Possible to generate a special food every 30 seconds
sfood_score = 5                        # each special food worth 5 scores
blocks = []                            # blocks for blocking the snake
scores = [0, 10, 50, 100, 150, 250, 350, 550, 750, 950, 1200]
levels = [0, 1,  2,  3,   4,   5,   6,   7,   8,   9,   10]
score = 0
level = 0
```

### How to Use
```sh
# Run directly with diffculity = 0
sudo python snake.py
# Run directly with diffculity = 1
sudo python snake.py 1
# Run directly with diffculity = 2
sudo python snake.py 2
```
### How to Play
Control: Press 'w', 'a', 's', 'd'

Speed up/remove effect: Press 'q'

Exit game: Press 'x'

License
----
MIT


text:
[![Docker Repository on Quay](https://quay.io/repository/broadinstitute/viral-classify/status "Docker Repository on Quay")](https://quay.io/repository/broadinstitute/viral-classify)
[![Build Status](https://travis-ci.com/broadinstitute/viral-classify.svg?branch=master)](https://travis-ci.com/broadinstitute/viral-classify)
[![Documentation Status](https://readthedocs.org/projects/viral-classify/badge/?version=latest)](https://viral-classify.readthedocs.io/en/latest/?badge=latest)
<!--
[![Coverage Status](https://coveralls.io/repos/broadinstitute/viral-ngs/badge.png)](https://coveralls.io/r/broadinstitute/viral-ngs)
[![Code Health](https://landscape.io/github/broadinstitute/viral-ngs/master/landscape.svg?style=flat)](https://landscape.io/github/broadinstitute/viral-ngs)
-->

viral-classify
=========

A set of scripts and tools for taxonomic identification, classification, and filtration from NGS data, with a focus on viral applications.

More detailed command line documentation can be found at [readthedocs](http://viral-classify.readthedocs.org/)

Developer documentation can be found at [here](DEVELOPMENT_NOTES.md)

Higher level pipelines and workflows for viral-ngs can be found in the [pipelines github repo](https://github.com/broadinstitute/viral-pipelines).

repository: broadinstitute/viral-classify

gha_license_id: NOASSERTION

repo_name: broadinstitute/viral-classify