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
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod
/***
* Appcelerator Titanium example of custom confirm dialog for TableView's delete events.
* Asks to confirm/cancel a delete operation. On cancel restores the deleted row in
* its former position in the table data.
*
* @Copyleft 2013 Patrick De Marta
* @License GNU GPL
*/
var win = Titanium.UI.createWindow({
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@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",
/*
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: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,
@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 / 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
<?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";