This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Required deps: | |
# imagemagick: https://imagemagick.org/script/download.php | |
# name of your master icon, must be at least 512X512 | |
PNG_MASTER="icon-large.png" | |
ICONSET_FOLDER="AppIcon.iconset" | |
sizes=( | |
16x16 | |
32x32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// poll async featch calls in a syncronized fashion, IE do not start the next function call until the previous was resolved. | |
// also allows for throttling :) | |
async function poll(fn, onData, throttle) { | |
const _throttle = throttle || 5000; | |
let lastPollStarted; | |
async function _poll(_fn, _onData) { | |
lastPollStarted = new Date().getTime(); | |
let response = await _fn(); | |
if (response.status === 200) { | |
// Get and show the message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* | |
* a trimmed down version (~812 bytes minified, not gzipped) of: https://github.com/matthewhudson/current-device/blob/master/src/index.js | |
* to determine current device is mobile, tablet or desktop | |
* USAGE: | |
* 1. prebuilt property: `window.device.type` returns "mobile", "tablet" or "desktop" | |
* 2. could call `window.device.mobile()` or `window.device.tablet()` or `window.device.desktop()` to check for each | |
* 3. other methods such as `window.device.windows()`, `window.device.windowsPhone()`, `window.device.android()`, `window.device.blackberry()` | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* EXPORT NAMESPACES | |
* 1. Open http://localhost:4502/crx/explorer/ui/namespace_editor.jsp | |
* 2. Open Chrome console, run script below | |
* 3. Copy result. | |
*/ | |
/** | |
* IMPORT NAMESPACES | |
* 1. Open http://localhost:4502/crx/explorer/nodetypes/index.jsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mycom.core.mcp; | |
import com.adobe.acs.commons.fam.ActionManager; | |
import com.adobe.acs.commons.mcp.ProcessDefinition; | |
import com.adobe.acs.commons.mcp.ProcessInstance; | |
import com.adobe.acs.commons.mcp.form.CheckboxComponent; | |
import com.adobe.acs.commons.mcp.form.FormField; | |
import com.adobe.acs.commons.mcp.form.PathfieldComponent; | |
import com.adobe.acs.commons.mcp.model.GenericReport; | |
import java.io.Serializable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Decodes asset names if they contain any encoded chars. | |
*/ | |
import java.net.URLDecoder | |
START = "/content/dam" | |
// renames a node | |
def renameToDecoded(node) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ahmedmusallam.service; | |
import java.io.IOException; | |
import java.net.URI; | |
import org.apache.http.client.CredentialsProvider; | |
import org.apache.http.client.methods.CloseableHttpResponse; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClients; | |
import org.apache.http.util.EntityUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Built this to filters a large array based on predicates to use with a Vuejs app I was building. | |
* It provides a declarative way to filter an array of objects whose properties are strings. | |
* But it can be adapted and improved for other types. | |
* you can see an example vuejs app that uses this method here: http://jsfiddle.net/ahmedmusallam/jruxn3bh/ | |
*/ | |
(function () { | |
/** | |
* @param {Arrray} predicates: an array of predicates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.JsonArray | |
import com.google.gson.JsonObject | |
/** | |
* This script will print a JSON array of all namespaces on current AEM instance | |
* Each JSON object in the array will be of the format: | |
* {"prefix":"The namespace prefix", "uri":"The namespace uri"} | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script will install ALL zip packages in current directory the AEM instance at 4502 | |
for f in *.zip | |
do | |
echo "installing: $f" | |
curl -u admin:admin -F file=@"$f" -F name="$f" -F force=true -F install=true http://localhost:4502/crx/packmgr/service.jsp | |
echo "done." | |
done |
NewerOlder