Skip to content

Instantly share code, notes, and snippets.

View boydlee's full-sized avatar

Boydlee Pollentine boydlee

View GitHub Profile
http://10.161.17.146/login?auth=eyAidXNlcm5hbWUiOiAiYXN0YXVzIiwgInBhc3N3b3JkIjogIjkxRDUzNDY0LTdBQUItNDEwQS1BMDNELUE5OTVCMDhFOUQyRiJ9
@boydlee
boydlee / app.js
Created October 9, 2016 16:21
OneSignal library and basic example for push notifications using Appcelerator Titanium See https://gist.github.com/boydlee/fc6955cbd4a7ba1d302df2a4bc93bb06 for the ti.onesignal.js module
/*
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"});
@boydlee
boydlee / ti.onesignal.js
Last active November 12, 2016 06:22
OneSignal library and basic example for push notifications using Appcelerator Titanium See https://gist.github.com/boydlee/2e5bbcf6c8795fd821d9e231841a776d for a basic usage example with tags. This code uses the GCM library "nl.vanvianen.android.gcm" which is on Github at https://github.com/morinel/gcmpush
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 */
@boydlee
boydlee / Gruntfile.js
Last active September 9, 2015 13:36 — forked from skypanther/Gruntfile.js
Grunt - build your Titanium app and upload to Installr
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.
*/

Contract Killer

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

/*
*
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
@boydlee
boydlee / imgur.js
Created September 21, 2012 16:52
Imgur.com image upload commonjs module for Titanium
/*
* 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:
@boydlee
boydlee / PhotoSelector.js
Created August 20, 2012 12:38
CommonJS module to access photo gallery and camera and return resulting image
/*
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){});