Skip to content

Instantly share code, notes, and snippets.

View santibecerra's full-sized avatar

Santiago Becerra santibecerra

  • InQBarna
  • España
View GitHub Profile
@jasonkneen
jasonkneen / 1readme.md
Last active May 28, 2021 16:48
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

@raulriera
raulriera / slideIn.js
Last active December 18, 2015 06:59
Extending the animation.js Alloy builtins
/**
* @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) {
@FokkeZB
FokkeZB / DOWNSIZE.md
Last active December 8, 2016 10:39
Automatically generate non-retina and Android images for Alloy projects

UPDATE: With the assets command of the TiCons CLI / Module this can be done even simpeler by calling $ ticons assets or an alloy.ymk using:

task("pre:load", function(event, logger) {
    require('ticons').assets();
});

// Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/
[{
"id": "view",
"children": [{
"id": "layout",
"children": [{
"command": "set_layout",
"caption": "Custom: 3 Pane",
"mnemonic": "C",
@FokkeZB
FokkeZB / alloy.js
Last active August 13, 2016 17:28
Quick #TiAlloy fix for windows being positioned under the status bar on #iOS7
// For iOS7 only, set the window's top to 20 so they start under the status bar.
Alloy.Globals.windowTop = (OS_IOS && parseInt(Ti.Platform.version[0], 10) >= 7) ? 20 : 0;
@iskugor
iskugor / alloy.js
Created November 14, 2013 11:30
Alloy "isTablet" that detects iPad mini
Alloy.isTablet = Alloy.isTablet || (Ti.Platform.model.search(/ipad/i) > -1);
@FokkeZB
FokkeZB / index.xml
Created January 21, 2014 18:13
Need a Window on IOS but a View on Android in Alloy?
<Alloy>
<Window module="xp.ui">
<Label>Hello World</Label>
</Window>
</Alloy>
@viezel
viezel / build-module-android.sh
Last active August 29, 2015 14:01
Build and copy android module
##
## Build an Appcelerator Android Module
## Then copy it to the default module directory
##
## (c) Napp ApS
## Mads Møller
##
## HOW TO GUIDE
@mikaturunen
mikaturunen / gist:f0b45def06bc83ccea9e
Created January 31, 2015 09:45
One way of hooking a callback from Angulars specific scope to HTML elements onload event
// There is no direct way of binding angular to elements onload event as commonly the HTML elements onload="" attribute looks into the
// Javascript global name space (window.*) which is a big no-no. It used to be the norm back in the day of how to do things but with
// modern frameworks like AngularJs and the such the approach has changed a lot.
// This is just one example (and by no means the only way) of how to get Angular behave nicely with HTML elements onload event. As
// <iframe onload="test()"> looks into window.test for a callback we need to bound the onload event to look into provided angular scope
// for the callback.
// NOTE: Written in ES6
@aaronksaunders
aaronksaunders / Flickr-Search-Example:-Using-Controller-As-syntax-and-ui-router-resolve.markdown
Last active May 10, 2017 20:04
Flickr Search Example: Using Controller As syntax and ui-router resolve

Flickr Search Example: Using Controller As syntax and ui-router resolve

Demo of loading images using the Flickr API with IonicFramework

showing ui-router functionality of controller as for cleaner looking code.

A Pen by aaron k saunders on CodePen.

License.