Skip to content

Instantly share code, notes, and snippets.

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

Alberto Luebbert M. almsx

🏠
Working from home
View GitHub Profile
#! /bin/bash
#(c)2011 Alberto Luebbert alberto (At) ideashappy.com
#constant check network connectivity, on lost
#re-start Cards if lost are "more large"
#reboot the system.
#the script check connectivity by ping google
CONNECTION=1
IFDOWN="/sbin/ifdown"
IFUP="/sbin/ifup"
REBOOT="/sbin/reboot"
/**
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left,
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view.
*/
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;
@almsx
almsx / app.js
Last active August 29, 2015 14:06 — forked from benbahrenburg/app.js
//This is the app.js you can use for testing
var win = Titanium.UI.createWindow({
backgroundColor:'#fff',layout:'vertical'
});
var btnAuthorization = Titanium.UI.createButton({
title:'Authorization Check', left:25,right:25, top:80
});
win.add(btnAuthorization);
<?php
/*** SETUP ***************************************************/
/*** Write by Ricardo Alcocer and Patrick Jongmans ***/
$key = "WWJRXK3gzFfi2nAnNfwqUMCp6jq29Taf"; //GET FROM APP MANAGEMENT (ACS)
$username = "almsx";;
$password = "almsx";
$channel = "ios";
$message = "PRUEBA de iOS";
@almsx
almsx / GeolocationModule.m
Created October 27, 2014 23:50
Can modify Location Services Disabled Message Appcelerator iOS
/**
* Appcelerator_Bootstrap Appcelerator_Bootstrap_Bootstrap Mobile
* Copyright (c) 2009-2012 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.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#ifdef USE_TI_GEOLOCATION
@almsx
almsx / Parse.com Push Notifications
Last active August 29, 2015 14:14
Allows the connection to the API modules without requiring Push Notifications With Titanium Appcelerator and Parse.com
var deviceToken;
var appId = 'cn26VA7yDzR6NRe4VHbOSwM5XJ8IOVJy1UrxnBOa';
var apiKey = 'ZN3YV2joK398fte7FECdapU7348j4tv3r1rscP7e';
var url = 'https://api.parse.com/1/installations';
var equipoxhr = Ti.Network.createHTTPClient({
onload : function(e) {
alert(this.responseText);
},
@almsx
almsx / gist:88c7eacc6dcf27bdd265
Created February 10, 2015 22:29
Platform openURL Classic
var win = Titanium.UI.createWindow({
backgroundColor : '#FFF',
exitOnClose : true,
navBarHidden : true
});
var btn = Titanium.UI.createButton({
title : 'Abrir URL',
width : 200,
height : 50,
/*
Define our various sizes.
*/
var AndroidSizes = {
'android/images/res-ldpi/splash.9.png': 240,
'android/images/res-mdpi/splash.9.png': 360,
'android/images/res-hdpi/splash.9.png': 480,
'android/images/res-xhdpi/splash.9.png': 720,
'android/images/res-xxhdpi/splash.9.png': 960,
'android/images/res-xxxhdpi/splash.9.png': 1440
/*
Define our various sizes.
*/
var AndroidSizes = {
'android/images/res-ldpi/splash.9.png': 240,
'android/images/res-mdpi/splash.9.png': 360,
'android/images/res-hdpi/splash.9.png': 480,
'android/images/res-xhdpi/splash.9.png': 720,
'android/images/res-xxhdpi/splash.9.png': 960,
'android/images/res-xxxhdpi/splash.9.png': 1440
@almsx
almsx / gist:bce2ae0b9f8dcaea3bfc
Last active August 29, 2015 14:21
JSON de Muestra
[{
"nombre": "Dr. David Moreno Valle",
"latitud": "19.404747",
"longitud": "-99.169421",
"categoria": "CARDIOLOGIA",
"distancia": "0.2",
"cantidad": "450",
"direccion": "Salamanca No. 74 Colonia Roma, Delegación Cuauhtemoc, C.P. 06700 México D.F",
"iconoServicio": "img/servicio.png",
"fechaServicioAgenda": "14Enero",