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
@almsx
almsx / PagingControl.js
Created March 10, 2017 02:24 — forked from raulriera/PagingControl.js
Custom paging control for scrollableViews for Titanium Appcelerator
// I was unhappy about there was close to no control over the "pageControl"
// in scrollableViews, so I hacked my own
// -----
// Configuration
var pageColor = "#c99ed5";
PagingControl = function(scrollableView){
var container = Titanium.UI.createView({
height: 60
@almsx
almsx / gist:3aac28bdd130dab2ed9b
Created October 6, 2015 23:18 — forked from daicham/gist:10253947
SSH config for connecting github and bitbucket over proxy
ProxyCommand "C:\Program Files\git\bin\connect.exe" -H proxy.example.com:8080 %h %p
Host github.com
HostName ssh.github.com
Port 443
IdentityFile C:\Users\hoge\.ssh\id_rsa
Host bitbucket.org
HostName altssh.bitbucket.org
Port 443
IdentityFile C:\Users\hoge\.ssh\id_rsa
#!/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)
/*
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 / 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);
/**
* 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*/;