- Python 3
- Pip 3
$ brew install python3
/* | |
For very big spaces, we can create chunks of the export, and import them separately. | |
To make it work, we have to keep a specific order. | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
/* the order of types must be kept */ | |
const types = [ |
// knockout 3.5.0 | |
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ } | |
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ } | |
ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } |
{ | |
"presets":["es2015"], | |
"plugins": [ | |
"transform-es3-member-expression-literals", | |
"transform-es3-property-literals" | |
] | |
} |
package com.nateyolles.sling; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.sling.SlingServlet; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.SlingSafeMethodsServlet; | |
import org.apache.sling.engine.SlingRequestProcessor; |
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
import javax.jcr.* | |
import org.apache.sling.api.resource.* | |
def ROOT_PATH = '/content/geometrixx' | |
def extractPaths(p) { | |
if (p instanceof Property && p.multiple) { | |
p.values.collect { extractPaths(it) }.flatten() | |
} else { | |
p.string.findAll(/\/content\/[^"]+/) |
SQL2
All nodes with a specific name
SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"
All pages below content path
This gist is in response to a question asked on the Reddit Angular JS forum about how to structure an Angular app with roles and permissions.
There are many ways to approach this, but I'll share one that I've used before and maybe it will give you an idea. I'd combine all of the above into a single app and control who gets to see what using permissions. There are a few components to this approach...
First off I'd advise creating some sort of local session management service. This should be able to track whether you have an authenticated user and- if so- what types of permissions that user has. (Lots of ways to manage permissions. I'll assume your user object has either a 'role' enum or something simple like an array of string permissions.) You could roll your own session service or you could check out something like satellizer.
Let's assume yo