Skip to content

Instantly share code, notes, and snippets.

Avatar

Iñaki Abete inakiabt

View GitHub Profile
View Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# http://www.vagrantbox.es/
config.vm.box = "ubuntu-12.04-docker"
config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-12.04-amd64-vbox.box"
# Sets the ip we'll use to access the box
config.vm.network :private_network, ip: "10.0.0.10"
config.vm.hostname = "myapp"
@DaveHudson
DaveHudson / Grunt-Installr
Created Jul 11, 2014
Grunt.js + Installr API
View Grunt-Installr
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
installr_settings: {
releaseNotes: grunt.file.read("./CHANGELOG.txt")
},
titanium: {
build_ios: { // build for ios first
@kwhinnery
kwhinnery / parse.js
Created Aug 27, 2011
A Parse client for Titanium Mobile - sneak peek
View parse.js
//Public client interface
function Client(applicationId, masterKey) {
this.applicationId = applicationId;
this.masterKey = masterKey;
}
exports.Client = Client;
//Parse API endpoint
var ENDPOINT = 'https://api.parse.com/1/classes/';
@tzmartin
tzmartin / gist:1372475
Created Nov 17, 2011
UIModule Error Hack
View gist:1372475
/*
* This is a hack solves the "Invalid method passed to UIModule" error
* It works by forcing Titanium to load SDK components into memory.
*
* Drop this file anywhere in your project and DON'T Ti.include() it.
* Be sure this file extension is .js.
* Clean and recompile your project.
*
* Enjoy!
* @tzmartin
View scrollViewFragment
var win = Ti.UI.createWindow({
title : 'Profile'
});
var mainViewHeight = Ti.Platform.displayCaps.platformHeight
- ClubTonight.ui.defaults.iphone.statusBarHeight
- ClubTonight.ui.defaults.iphone.navBarHeight
- ClubTonight.ui.defaults.iphone.tabBarHeight;
var scrollView = Titanium.UI.createScrollView({
top : 0,
contentWidth : Ti.Platform.displayCaps.platformWidth,
@mauropm
mauropm / app.js
Created Jan 3, 2012
Image caching in Appcelerator
View app.js
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var imgTableLoco = Ti.UI.createTableView({
width: 270,
height: 290,
top: 0,
backgroundColor: 'black'
});
@FokkeZB
FokkeZB / RATING.md
Last active Dec 16, 2015
Rate-my-app CommonJS module for Titanium
@raulriera
raulriera / slideIn.js
Last active Dec 18, 2015
Extending the animation.js Alloy builtins
View slideIn.js
/**
* @method slideIn
* Makes the specified view appear using a "slide-in" animation, it will automatically
* detect where the view is offscreen and bring it into the user's vison.
* @param {Titanium.UI.View} view View to animate.
* @param {Number} duration Fade duration in milliseconds.
* @param {function()} [finishCallback] Callback function, invoked after the popIn completes.
*/
exports.slideIn = function (view, duration, finishCallback) {
@mauropm
mauropm / app.js
Created Jul 4, 2013
An example of generic app with different actions according to the button. It's showing how to manage the destruction of the window after you use it, and other nice things. To use: Create a new classic mobile project in Titanium Studio, and copy all this files to Resources directory. This is intended to work with Titanium Mobile SDK 3.1.1.GA, wit…
View app.js
// INcluding memory management utils.
Ti.include('utils.js');
// root window.
var win = Ti.UI.createWindow({
backgroundColor:'white',
exitOnclose:true,
});
You can’t perform that action at this time.