Skip to content

Instantly share code, notes, and snippets.

View csemrm's full-sized avatar

Mostafizur Rahman csemrm

View GitHub Profile
@csemrm
csemrm / README.md
Created March 27, 2017 16:24 — forked from brentonhouse/README.md
Fading ActionBar in Titanium

Fading Actionbar

This is a quick example of how to create a fading actionbar effect like this in Appcelerator Titanium

fadingactionbar

How this works

This is actually very simple. The trick is putting the Actionbar in overlay mode by configuring the theme with windowActionBarOverlay:true. Then all you need to do is updating the color of the Actionbar, in this case by scrolling a ScrollView.

@csemrm
csemrm / avaudioplayer.js
Created March 27, 2017 16:18 — forked from hansemannn/avaudioplayer.js
Use the AVAudioPlayer with Hyperloop.
var AVAudioEngine = require('AVFoundation/AVAudioEngine');
var AVAudioPlayerNode = require('AVFoundation/AVAudioPlayerNode');
var AVAudioFile = require('AVFoundation/AVAudioFile');
var NSBundle = require('Foundation/NSBundle');
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
@csemrm
csemrm / index.xml
Created March 27, 2017 15:53 — forked from brentonhouse/index.xml
Flipboard style tabgroup indicator for iOS. Drop tabIndicator.js into your Alloy lib folder, then add the module tag to your tabgroup and parameters to override the defaults. As you click on each tab, the indicator will slide across. VIDEO https://www.dropbox.com/s/cbw5e1ruksud9uo/tabindicator.mp4?dl=0
<!-- note the ONLY change to this is the additional module="tabIndicator"
attribute + properties to override indicator defaults //-->
<Alloy>
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%">
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff">
<Window title="Tab 1" barColor="black" navTextColor = "#fff">
<Label onClick="openWin1">Tab 1</Label>
</Window>
</Tab>
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff">
@csemrm
csemrm / ti.dynamiclib.js
Created February 22, 2017 09:07 — forked from hansemannn/ti.dynamiclib.js
Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop
/**
* Ti.DynamicLib
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop.
* @version 1.1.0
*
* Install:
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location.
The path is relative to the `build/iphone` directory.
* 2a) For classic modules:
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)'
@csemrm
csemrm / Install Composer using MAMP's PHP.md
Created February 2, 2017 13:35 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@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/