Skip to content

Instantly share code, notes, and snippets.

@davidjgonzalez
davidjgonzalez / gist:66e481b54aafb1b900a579ee95848d8f
Created March 19, 2021 14:49
Asset Share Commons - Binary Resource discovery and Internal Redirect dispatching
@Override
public AssetRendition getRendition(final AssetModel assetModel, final AssetRenditionParameters parameters) {
throw new UnsupportedOperationException(String.format("[ %s ] is not supported by the AEM Async Asset Download Framework.",
this.getClass().getName()));
/*
// Commented out implementation for AEM as a Cloud Service as this only supports a sub-set of the original use-case.
final String expression = mappings.get(parameters.getRenditionName());
package com.adobe.aem.commons.assetshare.content.renditions.download.impl;
import com.adobe.aem.commons.assetshare.content.renditions.AssetRenditions;
import com.adobe.aem.commons.assetshare.content.renditions.download.AssetRenditionPacker;
import com.adobe.aem.commons.assetshare.content.renditions.impl.AssetRenditionServlet;
import com.adobe.aem.commons.assetshare.content.renditions.impl.AssetRenditionsImpl;
import com.adobe.aem.commons.assetshare.testing.MockAssetModels;
import com.adobe.aem.commons.assetshare.util.ServletHelper;
import com.adobe.aem.commons.assetshare.util.impl.ServletHelperImpl;
import io.wcm.testing.mock.aem.junit5.AemContext;
package com.adobe.aem.guides.wknd.core.components.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.doReturn;
import static org.mockito.ArgumentMatchers.*;
package com.adobe.aem.guides.wknd.core.components.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.doReturn;
import static org.mockito.ArgumentMatchers.*;
package com.adobe.aem.guides.wknd.core.components.impl;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.doReturn;
import static org.mockito.ArgumentMatchers.*;
export default class Page {
constructor() {
}
get path() {
return "light.html";
}
getQueryString(params) {
import Bem from '../../../../util/Bem';
export default class Sort {
constructor() {
this.bem = new Bem('cmp-search-sort');
this.component = $(this.bem.selector());
this.sortByElement = this.component.element(this.bem.scope('selection', 'sort-by').selector());
import Page from '../page/Page.component'
import Sort from './Sort.component';
let assert = require('assert');
describe('on reload of search page, with sort related query params, the search sort component', () => {
let page = new Page(),
sort = new Sort();
@davidjgonzalez
davidjgonzalez / config.json
Created February 11, 2018 20:16
QNAP Homebridge Container config.json
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "123-45-678"
},
"description": "This file configures support for Nest, TP-Link Devices and HarmonyHub Remote.",
"platforms": [
{
@davidjgonzalez
davidjgonzalez / install.sh
Last active August 14, 2022 19:53
QNAP Homebridge Container install.sh
#!/bin/bash
# *** Copy this file to /root/.homebridge ***
# This file gets executed as root, so you can use it to
# install or update any plugin dependencies.
# See https://github.com/marcoraddatz/homebridge-docker#installsh
npm update -g n