Skip to content

Instantly share code, notes, and snippets.

View adamtarmstrong's full-sized avatar
🏠
Working from home

Adam T Armstrong adamtarmstrong

🏠
Working from home
View GitHub Profile
@SquirrelMobile
SquirrelMobile / alloy.js
Created January 30, 2018 12:05
Upload large video from Axway Titanium mobile application (iOS / Android) and save the video with PHP script
//Download and install widget loader : https://github.com/FokkeZB/nl.fokkezb.loading
Alloy.Globals.loading = Alloy.createWidget("nl.fokkezb.loading");
@luciopaiva
luciopaiva / _Full-socketio-client-and-server-example.md
Last active September 19, 2025 17:23
Full socket.io client and server example

Full socket.io client and server example

Last updated: 2021-02-21, tested with socket.io v3.1.1

This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.

To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.

If you're looking for examples using frameworks, check these links:

@skypanther
skypanther / base64EncodeAscii.js
Created July 26, 2017 13:16
Titanium, alternative base64encode function; not the author, sorry I don't recall the original source for this; also untested in recent Ti versions
// alternative to built-in base64 encode function, which has outstanding bugs
// alternatively, use:
// String(Ti.Utils.base64encode(theBlob)).replace(/(\r\n|\n|\r)/gm,"");
function Base64EncodeAscii(str) {
if (/([^\u0000-\u00ff])/.test(str)) {
throw 'String must be ASCII';
}
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var o1,
o2,
package com.linkedin.platform.internals;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
*/
var TouchID = require("ti.touchid");
var win = Ti.UI.createWindow({
backgroundColor: "#fff",
@hansemannn
hansemannn / titanium-cli-hook.js
Last active February 3, 2018 03:14
Use Titanium CLI hooks to manipulate the .pbxproj file
'use strict';
exports.id = 'com.appcelerator.myplugin';
exports.cliVersion = '>=3.2';
exports.init = init;
/**
* main entry point for our plugin which looks for the platform specific
* plugin to invoke
*/
@grantges
grantges / README.md
Created April 18, 2016 13:58
Titanium TSS for Transparent NavigationBar / Shadow on iOS

Creating a transparent NavigationBar using Titanium Style Sheets

Appcelerator Titanium offers many ways to style the navigation bar for iOS apps, from changing out the title view all together, or just using simple colors. However, one of the most frequent requests I hear is how to make a truly transparent NavigationBar. This tutorial will cover that.

Getting started

Lets start with a pretty simple window style in the app.tss. This will ensure that the window style is applied globally.

Note: This can be used in a specific controller *.tss file if you only want this effect on a particular window.

@DouglasHennrich
DouglasHennrich / README.md
Created April 12, 2016 17:33 — forked from falkolab/README.md
How to use latest Alloy with appc CLI

If you want to use latest alloy with appc CLI command:

  1. Update Alloy: [sudo] npm install -g alloy

  2. Create file in your project <project root>/plugins/global.alloy/1.0/hooks/global_alloy_hook.js with content:

exports.init = function (logger, config, cli, appc) {
	delete process.env.ALLOY_PATH;
};
/* Circular Progress Bar Options
percent: A value between 0 and 1
size: The size of the circular progress bar
margin: The margin of the circular progress bar
backgroundColor: The backgroundColor of the circular area
progressColor: The backgroundColor of the progress bar
--
topper.color: The center circle color
topper.size: The size of the center circle
@grantges
grantges / GLOSSARY.md
Last active January 26, 2016 14:23
Glossary for use with Appcelerator Platform related gitbooks.

Alloy

An MVC development framework built on top of Appcelerator Titanium for the purpose standardization of rapid application development. Alloy supports an abstracted view / controller paradigm for User Interface development seperating business logic from the graphical aspects of the mobile app, while also supplying a standardized mechanism for handling and binding data to the app and associated controllers.

API

Stands for Application Programming Interface which can be client side or server side functions which allow other programs to interact with the core features, gather data or perform business logic tasks and workflows on the underlying system.

APIs

The plural for API (Application Programming Interfaces)

Appcelerator Platform