Skip to content

Instantly share code, notes, and snippets.

@hal-gh
hal-gh / app.js
Created May 10, 2012 21:47
Diagnostics
cls
cd \
echo %PROGRAMFILES%
echo %PROGRAMDATA%
echo %USERPROFILE%
echo %PATH%
echo %JAVA_HOME%
java -version
javac -version
python -V
@hal-gh
hal-gh / logo.txt
Created January 10, 2012 16:43
Logo
....... .. . . . . WEWI .............
..... . . . WEWILL$ . .............
... .. .... .. ........ .. ..$WEWILLC .. ...............
... ... .... WEWILLCON .............
... ...... .. . .. ... . ..WEWILLCON.. ... .............
...... .... . .... ... .....WEWILLCO .... ...............
... .. . WEWILLC. .............
... . .... WEWIL.. .............
... . ... . ~O+.. ..:MDDD... .............
..... . .. . ..WEWILLCONTRO. ..LYOUWEWILLCONT.............
@hal-gh
hal-gh / gist:1521318
Created December 26, 2011 14:55
tableview padding
var win = Ti.UI.createWindow({
backgroundColor: 'white',
fullscreen: false
});
var data = [];
for(var i=0;i<20;i++){
var descriptionRow = Ti.UI.createTableViewRow({
height:100,
@hal-gh
hal-gh / output
Created December 26, 2011 02:05
picker test
Titanium.UI.setBackgroundColor('#000');
var win1 = Ti.UI.createWindow({
backgroundColor:'white',
fullscreen:false,
exitOnClose:true
});
var minDate = new Date(2011,11,1);
@hal-gh
hal-gh / gist:1513998
Created December 23, 2011 12:04
Tab test
Ti.UI.setBackgroundColor('#000');
var tabGroup = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Ti.UI.createTab({
title:'Tab 1',
@hal-gh
hal-gh / app.js
Created December 20, 2011 12:43
CommonJS Stateful Example
var stateful = require('statefulModule');
var score = require('scoreModule');
var window = Ti.UI.createWindow({
backgroundColor:'white',
fullscreen:false,
title:'Click window to score'
});
window.addEventListener('click', function() {
data='<th scope="col" style="padding-top:0">Heading one</th> </tr><tr class="odd"> <td>May 2011</td> <td>dfgibwsd</td> ';
var regExArr = [
{
"regex":"<td.*>[\\S\\s]*</td>",
"modifier":"gi",
"action":"match"
}
]
var resultsArray = [];
for(var i=0,ilen=regExArr.length;i<ilen;i++){
@hal-gh
hal-gh / app.js
Created May 27, 2011 19:03
local and remote webview demo
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
backgroundColor:'white',
exitOnClose:true,
layout:'vertical',
title:'win1: Main Window'
});
Ti.App.addEventListener('fromWebview',function(e){
@hal-gh
hal-gh / LICENSE.txt
Created May 23, 2011 22:19 — forked from peterhil/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
Copyright (c) 2011 Peter Hillerström, http://peter.vasb.fi/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@hal-gh
hal-gh / gist:779846
Created January 14, 2011 16:40
Basic Animation Exception
893 AndroidRuntime D Shutting down VM
893 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x4001d800)
893 TiUncaughtHandler E (main) [59,33533] Sending event: exception on thread: main msg:java.lang.IllegalStateException: call to
getView on a Window; Titanium 1.5.2,2011/01/11 12:45,e8ed10...
893 TiUncaughtHandler E java.lang.IllegalStateException: call to getView on a Window
893 TiUncaughtHandler E at ti.modules.titanium.ui.WindowProxy.getView(WindowProxy.java:57)
893 TiUncaughtHandler E at org.appcelerator.titanium.util.TiAnimationBuilder.render(TiAnimationBuilder.java:176)
893 TiUncaughtHandler E at org.appcelerator.titanium.util.TiAnimationBuilder.render(TiAnimationBuilder.java:133)
893 TiUncaughtHandler E at org.appcelerator.titanium.view.TiUIView.processProperties(TiUIView.java:419)
893 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.p