It never used to be possible to get an A+ rating, as Java missed a couple of necessary features
wget http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletResponse; |
env | grep "$TPL_PREFIX" | while read -r VAR; | |
do | |
REPLACE="s/`echo "$VAR" | sed -e s,=,/,`/" | |
sed -e "$REPLACE" "$SOURCE_FILE" > "$TARGET_FILENAME" | |
done |
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<!-- ====================================================================== --> | |
<!-- P R O J E C T D E S C R I P T I O N --> | |
<!-- ====================================================================== --> | |
<groupId>uk.co.diffa.contentsync</groupId> | |
<artifactId>sync</artifactId> |
'use strict'; | |
var crypto = require('crypto'); | |
// Lambda@Edge does not allow for environment variables so compare credential hash rather than store credentials in code | |
// sha256 hex digest of the Basic base64(username:password) header | |
// e.g. show below, generated on mac: | |
// echo -n "Basic `(echo -n 'admin:password' | openssl base64)`" | shasum -a 256 | |
const authStringSha256 = '9f19de0237c9bd59f803de1785f7aea4e3499b6929df3428e1b415fed81f797a'; |
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'user'; | |
const authPass = 'pass'; |
It never used to be possible to get an A+ rating, as Java missed a couple of necessary features
wget http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.myapp</groupId> | |
<artifactId>jjwt</artifactId> | |
<version>0.6.0</version> | |
<packaging>bundle</packaging> | |
<name>JSON Web Token support for the JVM</name> | |
<description> | |
This bundle simply wraps ${pkgGroupId}-${pkgVersion}.jar and makes android.util optional | |
</description> |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
<sly data-sly-use.form="test.js"></sly> | |
sly data-sly-test.errors="${form.validate}"></sly> | |
<sly data-sly-test="${errors}">${form.renderForm}</sly> | |
<sly data-sly-test="${!errors}">${form.redirectSuccess}</sly> |