Skip to content

Instantly share code, notes, and snippets.

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

Jigar M JigarM

🏠
Working from home
View GitHub Profile
@JigarM
JigarM / Lisstview.js
Created September 18, 2014 15:46
Titanium ListView
var rootWin = Ti.UI.createWindow();
var navGroup = Ti.UI.iPhone.createNavigationGroup({
window: rootWin
});
var button = Ti.UI.createButton({
title: 'Open ListView Tests'
});
button.addEventListener('click', function() {
openTestsWindow();
});
@JigarM
JigarM / app.js
Last active October 26, 2015 08:32 — forked from mstepanov/app.js
var rootWin = Ti.UI.createWindow();
var navGroup = Ti.UI.iPhone.createNavigationGroup({
window: rootWin
});
var button = Ti.UI.createButton({
title: 'Open ListView Tests'
});
button.addEventListener('click', function() {
openTestsWindow();
});
@JigarM
JigarM / thumbnail.js
Last active August 29, 2015 14:05
Titanium : Create Thumbnail Image From Video File
/**
Create Thumbnail of Video File
*/
var movie = Titanium.Media.createVideoPlayer({
contentURL:FILEURL,
movieControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,
scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FILL,
width:100,
height:100
});
@JigarM
JigarM / ColorConvert.js
Last active August 29, 2015 14:03
ColorConvert.js For Titanium
var hsv2rgb = function(hsv) {
var h = hsv.hue, s = hsv.sat, v = hsv.val;
var rgb, i, data = [];
if (s === 0) {
rgb = [v, v, v];
} else {
h = h / 60;
i = Math.floor(h);
data = [v * (1 - s), v * (1 - s * (h - i)), v * (1 - s * (1 - (h - i)))];
switch(i) {
@JigarM
JigarM / app.js
Created July 3, 2014 12:25
How Publish a Tweet (Titanium) using Codbird.js
var win = Ti.UI.createWindow();
// Main Window
var twitter = Ti.UI.createButton({
title : 'Set Tweet'
});
var accessToken = null;
var accessTokenSecret = null;
///////////LOAD ACCESS TOKEN
@JigarM
JigarM / app.js
Last active August 29, 2015 14:03
Codebird for Titanium Using the Twitter API Version 1.1
// This is an example of use.
// Here we use the new Bearer Token thats make it possible to get tweets without user login
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth
// Full Codebird API is here: https://github.com/mynetx/codebird-js
var Codebird = require("codebird");
var cb = new Codebird();
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY');
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null);
/**
* @aaronksaunders
*
* See more Appcelerator Information on Company Blog
* blog.clearlyinnovetiove.com
*
*/
var TiParse = function(options) {
FB = {
init: function() {
@JigarM
JigarM / app.js
Created July 4, 2013 01:29 — forked from mauropm/app.js
// INcluding memory management utils.
Ti.include('utils.js');
// root window.
var win = Ti.UI.createWindow({
backgroundColor:'white',
exitOnclose:true,
});
@JigarM
JigarM / app.js
Created June 28, 2013 09:34 — forked from pec1985/app.js
function PassCode(_params){
_params = _params || {};
// @PARAMS:{
// boxSize: (Number) size of the passcode character boxes
// backgroundColor: (String) background color of the mainview
// backgroundImage: (String) background image of the mainview
// panicColor: (String) background color of the view when panic() is called - when wrong password
// titleText: (String) the text of the title view, above the pass code boxes by default,
// mainView: (Object) params for the main view that hold the passcode boxes
//
// blog.clearlyionnovative.com
// twitter: @aaronksaunders
//
// Model file for integration Appcelerator Titanium Alloy with Wordpress JSON Plugin
//
exports.definition = {
config : {
"columns" : {},