For signed URLs, refer here
from cloudfront_signed_url import generate_cloudfront_signed_url
url = "https://your-cf-domain.com/path/to/file.txt"
cookie = generate_cloudfront_signed_cookie(url, 3600)
Ti.include('lib/htmlparser.js'); | |
Ti.include('lib/soupselect.js'); | |
var select = soupselect.select; | |
var body = '<html><head><title>Test</title></head>' | |
+ '<body>' | |
+ '<img src="http://l.yimg.com/mq/i/home/HKGallery.gif" />' | |
+ '<div id="block">' | |
+ ' <div class="row">Row 1</div>' |
This gist is only for Android. | |
If you would like launch native apps | |
on iPhone, iPad, you can find information about it in Appcelerator Docs: | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html | |
More info about iOS URL Schemes: http://handleopenurl.com/ |
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); | |
// | |
// create base UI tab and root window | |
// |
package com.yokogoshi.line_intent_test; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.util.List; |
/*When we load any website site in webView it generate some cache file also in the app cacheDirectory we | |
can delete this easily, here is the sample code*/ | |
var win = Ti.UI.createWindow({ | |
layout : 'vertical', | |
exitOnClose : true | |
}); | |
var delBtn = Ti.UI.createButton({ | |
top : 10, |
/** | |
* A Resolver that doesn't call getClass(). | |
* | |
* @author kawasima | |
*/ | |
public class SafeResolver extends DefaultResolver { | |
private static final char NESTED = '.'; | |
private static final char MAPPED_START = '('; | |
private static final char MAPPED_END = ')'; | |
private static final char INDEXED_START = '['; |
package example; | |
import org.apache.commons.beanutils.expression.DefaultResolver; | |
public class SafeResolver extends DefaultResolver { | |
@Override | |
public String next(String expression) { | |
String property = super.next(expression); | |
if ("class".equalsIgnoreCase(property)) { |
function doClick(e) { | |
alert($.label.text); | |
} | |
$.index.open(); | |
var alertFields = { | |
title: 'Notification', //Android Only | |
body : 'Just another notification', | |
badge: 1, |
<?php | |
/** | |
* Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up | |
* Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md | |
*/ | |
use Jose\Factory\JWKFactory; | |
use Jose\Loader; | |
// We load the key set from a URL | |
// JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json. |
For signed URLs, refer here
from cloudfront_signed_url import generate_cloudfront_signed_url
url = "https://your-cf-domain.com/path/to/file.txt"
cookie = generate_cloudfront_signed_cookie(url, 3600)