Skip to content

Instantly share code, notes, and snippets.

View jonalter's full-sized avatar

Jonathan Alter jonalter

View GitHub Profile
@srahim
srahim / _app_props_.json
Created January 6, 2014 22:24
anvil file
{
"driver.socketPort":40405
}
@ndastur
ndastur / buildModForMe.bash
Created January 18, 2013 21:33
I got fed up of the fact that once I released a module into the Appcelerator marketplace I could not use it myself without getting Un-licensed module errors. So this script, modified the GUID and re-builds the module, then installs to the SDK location. Note that in more recent installs the SDK is located in home. Just change the line at 37,38 an…
#!/bin/bash
# make a backup file with the module GUID
# just in case there is some funny script error
# it will be available here
if [ ! -e "./moduleGUID_Backup.txt" ]
then
grep -i guid manifest > ./moduleGUID_Backup.txt
fi
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 06:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@mauropm
mauropm / bufferlib.js
Created April 18, 2012 23:20
Buffer Operations
/*
* (c) 2012 Mauro Parra-Miranda mauropm@gmail.com
* This functions will get save your buffer to hex, going from hex to buffer
* and will allow you to save a buffer to A JSON and recovering a JSON from the buffer.
*/
bufferToHex = function(buf) {
var res = new Array(buf.length);
for(var idx = 0; idx < buf.length; idx++) {
var b = Ti.Codec.decodeNumber({
@dawsontoth
dawsontoth / xmlToJS.js
Created March 22, 2012 17:25
XML to JS Module
/**
* XMLToJS Module 0.1
*
* To use:
* var XMLToJS = require('xmlToJS');
* var jsObject = XMLToJS.convert(xml);
*
* This will take XMl like the following:
*
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom">
@rblalock
rblalock / app.js
Created November 2, 2011 15:15
Wrapping TiUI Objects
// Prototype version:
// Ti.include('prototype.js');
// Module version:
// Ti.include('module.js');
// Factory version:
Ti.include('factory.js');
var win = Ti.UI.createWindow({
@adampax
adampax / titanium-array-form-next-key.js
Created October 20, 2011 17:59
Simple Titanium form saved in an array with return key eventlistener moving to the next field
Ti.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title : 'test'
});
var arrayLength = 5
var fields = new Array(arrayLength);
for( i = 0; i < arrayLength; i++) {
@dawsontoth
dawsontoth / app.js
Created June 6, 2011 20:40
Rate my app in Appcelerator Titanium Mobile
/**
* The following snippet will ask the user to rate your app the second time they launch it.
* It lets the user rate it now, "Remind Me Later" or never rate the app.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
win.addEventListener('open', checkReminderToRate);
win.add(Ti.UI.createLabel({ text: 'This is a simple app that will remind you to rate it.' }));
win.open();
function checkReminderToRate() {
@dawsontoth
dawsontoth / app.js
Created March 4, 2011 00:44
Customize the look of the tab bar in iOS Appcelerator Titanium
Ti.include('overrideTabs.js');
/*
This is a typical new project -- a tab group with three tabs.
*/
var tabGroup = Ti.UI.createTabGroup();
/*
Tab 1.