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
(function (server, registry) { | |
var log = new Log(); | |
var GenericArtifactManager = Packages.org.wso2.carbon.governance.api.generic.GenericArtifactManager; | |
var GenericArtifactFilter = Packages.org.wso2.carbon.governance.api.generic.GenericArtifactFilter; | |
var ByteArrayInputStream = Packages.java.io.ByteArrayInputStream; | |
var QName = Packages.javax.xml.namespace.QName; | |
var IOUtils = Packages.org.apache.commons.io.IOUtils; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<metadata xmlns="http://www.wso2.org/governance/metadata"> | |
<LIVE> | |
<date>2013-08-15 10:44:42.092</date> | |
</LIVE> | |
<IN-REVIEW> | |
<date>2013-08-15 10:44:26.361</date> | |
</IN-REVIEW> | |
<overview> | |
<status>LIVE</status> |
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
{ | |
"welcomeFiles": ["index.jag"], | |
"initScripts": ["config/app.js"], | |
"urlMappings": [ | |
{ | |
"url": "/login", | |
"path": "/login.jag" | |
}, | |
{ | |
"url": "/logout", |
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 | |
# Created by: Chan | |
# Date: 2013/11/24 | |
PRODUCT_HOME="$1" | |
if [ -z "$PRODUCT_HOME" ]; then | |
echo "Usage: $(basename $0) <domain>" | |
exit 11 | |
fi | |
fail_if_error() { |
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
var buildPlatformString = function(platform){ | |
var platform = platform.toUpperCase(); | |
if ( platform== 'ANDROID'){ | |
platform = 'devices.platform_id=1'; | |
}else if (platform == 'IOS'){ | |
platform = '(devices.platform_id=2 or devices.platform_id=3 or devices.platform_id=4)'; | |
} | |
return platform; | |
} | |
var buildDynamicQuery = function(platform, type){ |
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 javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
public class RhinoEngine { | |
public static void main(String[] args) { | |
ScriptEngineManager mgr = new ScriptEngineManager(); | |
ScriptEngine engine = mgr.getEngineByName("JavaScript"); | |
try { | |
engine.put("name", args[0]); |
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
PRODUCT_HOME="$1" | |
IOS_CERTS="$2" | |
IP="$3" | |
PRODUCT_CONF="$4" | |
CONFIG_FILE="./openssl_custom.cnf" | |
TEMP_FOLDER="./temp" | |
PUSH_CERT="`echo $IOS_CERTS`pushcert.pfx" | |
PUSH_PASS="" | |
MDM_CERT="`echo $IOS_CERTS`PlainCert.pfx" | |
MDM_PASS="" |
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
# Merge development branch to master branch | |
function merge_projects(){ | |
# Path to child project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/apps/mdm | |
git checkout master | |
git pull origin master | |
git merge $1 | |
git push origin master | |
} | |
# Get updates from master for child projects in parent project |
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
var url = "https://api.twitter.com/1/statuses/user_timeline.json"; | |
var data = { include_entities:true,include_rts:true,screen_name:"wso2",count:1 }; | |
var twitterJson = get(url, data ,"json", function(data, xhr){ | |
print(data); | |
}); |
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
var getAddress = function(transport){ | |
var process = require("process"), | |
host = process.getProperty('server.host'), | |
ip = process.getProperty('carbon.local.ip'); | |
var log = new Log(); | |
var port; | |
if(transport=="http"){ | |
port = process.getProperty('mgt.transport.http.proxyPort'); | |
if(!port){ | |
//can use http.port as well |