Skip to content

Instantly share code, notes, and snippets.

View csemrm's full-sized avatar

Mostafizur Rahman csemrm

View GitHub Profile
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';
@csemrm
csemrm / app.js
Created December 28, 2014 09:20 — forked from rakhimoni/app.js
var win = Titanium.UI.createWindow({
backgroundColor : 'red',
});
// get refernce to the current window
var queslabel = Titanium.UI.createLabel({
text : 'Question',
height : 50,
color : '#000000',
font : {
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/
@csemrm
csemrm / social.js
Last active August 29, 2015 14:27 — forked from myleftboot/social.js
An implementation of social.js for Appcelerator Titanium. Works with Twitter v1.1 effective from 5th March 2013
/**
* This is a JavaScript module for Titanium Mobile made by Dawson Toth. I adapted the majority of this code from other
* authors to make it easy to share content on social sites through a single interface.
*
* Example usage: http://appc.me/social.sample.js
*
*/
//
@csemrm
csemrm / README.md
Created June 16, 2016 06:02 — forked from FokkeZB/README.md
URL schemes for iOS and Android (1/2)
@csemrm
csemrm / README.md
Created September 16, 2016 05:33 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@csemrm
csemrm / gcm.js
Created November 19, 2016 15:08 — forked from accuervo/gcm.js
// gcm.js
/**
* Librería gcm - CommonJS - Alloy
* @author Andrés Castaño Cuervo
* @version 1.1.1
* Copyright Evomedia
* www.evoluciondigital.com.co
*/
// Inclusión del módulo.
@csemrm
csemrm / PHP_push_iOS.php
Created November 25, 2016 08:05 — forked from mako34/PHP_push_iOS.php
PHP test for iOS push notification
<?php
// Provide the Host Information.
//$tHost = 'gateway.sandbox.push.apple.com';
$tHost = 'gateway.push.apple.com';
$tPort = 2195;
@csemrm
csemrm / PushNotifications.php
Created November 25, 2016 10:01 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@csemrm
csemrm / 1readme.md
Created December 12, 2016 18:48 — forked from jasonkneen/1readme.md
Quick example of registering a URLScheme in a Titanium app using the TiApp.xml without info.plist file. Just add the following into your TiApp.xml (I put it under the </iphone> tag. Works on Android and iOS.

Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js