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 / info.js
Created April 27, 2017 16:24
My Address
Email: [email protected]
Skype; csemrm
@csemrm
csemrm / credentials.js
Created August 31, 2017 07:59 — forked from aaronksaunders/credentials.js
Updated Instagram Integration with Appcelerator, all the files you need are here, be sure to include the promises library in your project
exports.C = {
INSTAGRAM_CLIENT_ID : 'replace this with your public', //replace this with your public
INSTAGRAM_CLIENT_SECRET : 'replace this with your private key', //replace this with your private key
INSTAGRAM_CALLBACK_URL : 'replace this with your INSTAGRAM_CALLBACK_URL'
};
@csemrm
csemrm / app.js
Created September 13, 2017 11:07
Email Dialog
var win = Ti.UI.createWindow({
title : "Modal Window"
});
var Button = Ti.UI.createButton({
title : 'Click Me!',
});
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.subject = "Hello from Titanium";
function onLoad(e) {
var data = {
"wireless" : JSON.stringify([{
"name" : "wlan0",
"mode" : "infrastructure",
"wps_method" : "pbc",
"authentication" : "wpa_psk",
"eap_type" : "",
"ssid" : "NAVOTA"
}, {
@csemrm
csemrm / gist:585fbbb598b39becb85f74c8b6043b2b
Created January 18, 2018 10:25 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@csemrm
csemrm / titanium-auth-session.js
Created February 13, 2018 20:07 — forked from hansemannn/titanium-auth-session.js
Use Axway Hyperloop to perform OAuth-sessions with the iOS 11+ API "SFAuthenticationSession"
const SFAuthenticationSession = require('SafariServices/SFAuthenticationSession');
const NSURL = require('Foundation/NSURL');
const session = SFAuthenticationSession.alloc().initWithURLCallbackURLSchemeCompletionHandler(
NSURL.alloc().initWithString('https://github.com/login/oauth/authorize?scope=repo&client_id=XXXXX'),
'appcgithub://',
function(url, error) {
if (error != null) {
Ti.API.error('Error performing OAuth: ' + error.localizedDescription);
cb({ success: false, error: 'Error performing OAuth: ' + error.localizedDescription });
var FBSDKShareLinkContent = require("FBSDKShareKit/FBSDKShareLinkContent"),
FBSDKShareDialog = require("FBSDKShareKit/FBSDKShareDialog"),
NSURL = require("Foundation/NSURL");
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var btn = Ti.UI.createButton({
title: "Trigger Share Dialog"
@csemrm
csemrm / app.js
Last active February 18, 2018 11:38
MediaPlayer Hyperloop Android remote URL
var AudioManager = require("android.media.AudioManager"),
MediaPlayer = require('android.media.MediaPlayer');
var audioPlayer = new MediaPlayer();
//mPlayer.prepare();
//audioPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
if (audioPlayer.isPlaying()) {
audioPlayer.reset();
}
audioPlayer.setDataSource('http://revelbeats.com/assets/audio/Salsa/DJ_Johnny_Famolari_Jailmix_salsa.mp3');
@csemrm
csemrm / Gruntfile.js
Created March 14, 2018 18:15 — forked from FokkeZB/Gruntfile.js
Example Gruntfile.js for The Ultimate Titanium CLI Toolchain at Connect.js
module.exports = function(grunt) {
grunt.initConfig({
settings: {
releaseNotes: grunt.option('notes') || 'CI build',
appName: 'Flashlight',
ppUuid: '0253600x-ac6d-35b6-b66d-dd25c4fd956f',
installrAppToken: '6xC0I8SdJA76kW3pqq7GFZLIyq6fBP4Z'
},