The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| http://10.161.17.146/login?auth=eyAidXNlcm5hbWUiOiAiYXN0YXVzIiwgInBhc3N3b3JkIjogIjkxRDUzNDY0LTdBQUItNDEwQS1BMDNELUE5OTVCMDhFOUQyRiJ9 |
| /* | |
| OneSignal library and basic example for push notifications using Appcelerator Titanium | |
| See https://gist.github.com/boydlee/fc6955cbd4a7ba1d302df2a4bc93bb06 for the ti.onesignal.js module | |
| */ | |
| var OneSignal = require('ti.onesignal'); | |
| OneSignal.register(function(response){ | |
| console.log(response); | |
| if(response.success && response.id != "") { | |
| //response.id your OneSignal installation id | |
| OneSignal.updateTags(response.id, {"fav_color": "yellow", "my_tag": "abc123"}); |
| var gcm; | |
| var androidSettings = { | |
| /* The Sender ID from Google Developers Console, see https://console.developers.google.com/project/XXXXXXXX/apiui/credential */ | |
| /* It's the same as your project id */ | |
| senderId: Alloy.CFG.gcm_project_id ? Alloy.CFG.gcm_project_id : "<your gcm project id --- xxxxxxxxxxxx>", | |
| notificationSettings: { | |
| //sound: 'mysound.mp3', /* Place sound file in platform/android/res/raw/mysound.mp3 */ | |
| smallIcon: 'trayicon.png', /* Place icon in platform/android/res/drawable/notification_icon.png */ | |
| largeIcon: 'appicon.png', /* Same */ |
| var _ = require('underscore')._; | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| settings: { | |
| appName: 'YourAppName', | |
| ppUuid: 'uuid', /* Provisioning profile UUID */ | |
| distributionName: 'cert_name', /* Distr. certificate name */ | |
| keystoreLocation: '/Users/path/to/android.keystore', /* path to keystore */ | |
| storePassword: 'keystore_password', /* keystore password */ |
| <?php | |
| /* | |
| * This file is part of the Symfony package. | |
| * | |
| * (c) Fabien Potencier <[email protected]> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. | |
| */ |
| /* | |
| * | |
| Gibberish-AES | |
| A lightweight Javascript Libray for OpenSSL compatible AES CBC encryption. | |
| Author: Mark Percival | |
| Email: [email protected] | |
| Copyright: Mark Percival - http://mpercival.com 2008 | |
| With thanks to: |
| var win = Titanium.UI.createWindow(); | |
| var webview = Titanium.UI.createWebView({ | |
| url:'https://www.google.co.uk/', | |
| touchEnabled:true, | |
| enableZoomControls:false, | |
| width:Titanium.Platform.displayCaps.platformWidth, | |
| loading:true, | |
| left:0, | |
| top:0, | |
| willHandleTouches:false |
| /* | |
| * IMGUR.COM Anonymous image upload API | |
| */ | |
| Imgur = function(){ | |
| this.key = 'XXXXXXXXXX'; //get one free at imgur.com | |
| this.httpEndpoint = 'http://api.imgur.com/2/'; | |
| }; | |
| /* | |
| * Upload method, sample usage: |
| /* | |
| PhotoSelector.js | |
| Gets a photo from camera or gallery | |
| Usage: | |
| var ps = require('PhotoSelector'); | |
| var select = new ps.PhotoSelector(); | |
| //get a photo from the camera | |
| select.fromCamera(false, true, function(success){}, function(failed){}, function(cancelled){}); |