Skip to content

Instantly share code, notes, and snippets.

View csemrm's full-sized avatar

Mostafizur Rahman csemrm

View GitHub Profile
@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

@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 / 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 / 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 / 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 / README.md
Created June 16, 2016 06:02 — forked from FokkeZB/README.md
URL schemes for iOS and Android (1/2)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Light" parent="Theme.AppCompat.Light"/>
<style name="Dark" parent="Theme.AppCompat"/>
<style name="Theme.CustomActionBar" parent="@style/Theme.AppCompat.Light">
<!-- Specify an Action Bar style to use -->
</style>
</resources>
@csemrm
csemrm / app.js
Created March 18, 2016 07:00
Login with TouchId in Appcelerator
var TiTouchId = require("ti.touchid");
var win = Ti.UI.createWindow();
var btn = Ti.UI.createButton({
title : 'authenticate'
});
win.add(btn);
var retry = 0;
btn.addEventListener('click', function() {
var win = Titanium.UI.createWindow({
title : 'Audio Test',
backgroundColor : '#fff',
//layout : 'vertical'
});
var url = encodeURIComponent("https://itunes.apple.com/us/app/smartuaq/id1063110068?ls=1&mt=8").replace(/'/g,"%27").replace(/"/g,"%22");
var whatsappUrl = 'whatsapp://send?text=' + url;
@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
*
*/
//