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
<?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> |
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
'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'; |
package com.sample.osgi; | |
import java.util.Map; | |
import org.apache.felix.scr.annotations.Activate; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Modified; | |
import org.apache.felix.scr.annotations.Property; | |
@Component(label = "Service Label", description = "Service Description", metatype = true, immediate = true) |
<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> |
<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> |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."
package uk.co.diffa; | |
import org.apache.felix.scr.annotations.Activate; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.sling.api.resource.LoginException; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.api.resource.ResourceResolver; | |
import org.apache.sling.api.resource.ResourceResolverFactory; |
Note 1: The following CQ curl commands assumes a admin:admin username and password. | |
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command. | |
Example: -F"":operation=delete"" | |
Note 3: Quotes around name of package (or name of zip file, or jar) should be included. | |
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F |
# Remove the file metadata included in TAR files | |
gci . -r -include ._* -force | remove-item -r -force | |
# Remove SVN files from a project directory tree | |
# http://stackoverflow.com/questions/2210193/powershell-how-to-recursivelly-delete-all-svn-files | |
gci . -r -include .svn -force | remove-item -r -force |