Skip to content

Instantly share code, notes, and snippets.

View seanoshea's full-sized avatar

Sean O'Shea seanoshea

View GitHub Profile
<!doctype>
<html>
<head>
<style>
#container {
border: 1px solid red;
height: 100px;
width: 20%;
overflow-x: visible;
}
<!doctype>
<html>
<head>
<style>
#container {
border: 1px solid red;
height: 55px;
width: 20%;
overflow:auto;
overflow-x: scroll;
@seanoshea
seanoshea / gist:959510
Created May 6, 2011 18:36
Ant build for Titanium Desktop
<if>
<isset property="isUnix"/>
<then>
<exec executable="./tibuild.py" dir="${osx.ti.sdk.dir}">
<arg line="-v -n -o osx -t bundle -a osx -s ../../tmp -d ../../ ../../tmp" />
</exec>
</then>
<else>
<exec executable="cmd" dir="${win.ti.sdk.dir}">
<arg line="/c" />
@seanoshea
seanoshea / TiDesktopRCBuildFailure
Created May 17, 2011 16:38
Titanium Desktop 1.2 RC1 build failure
cl /Fobuild\win32\objs\modules\tiui\win\UIWin.obj /c modules\ti.UI\win\UIWin.cpp
/TP /nologo /Z7 /EHsc /GR /MD /MD /DUNICODE /D_UNICODE /DOS_WIN32=1 /D_OS_NAME=
win32 /D_PRODUCT_VERSION=1.2.0 /D_PRODUCT_NAME=Titanium /D_GLOBAL_NS_VARNAME=Tit
anium /D_CONFIG_FILENAME=tiapp.xml /D_BOOT_RUNTIME_FLAG= /D_BOOT_HOME_FLAG= /D_D
ISTRIBUTION_URL=api.appcelerator.net /D_CRASH_REPORT_URL=api.appcelerator.net/p/
v1/app-crash-report /DOS_32=1 /DDEBUG=1 /DWIN32_CONSOLE=1 /DMODULE_NAME=tiui /DM
ODULE_VERSION=1.2.0 "/IC:\Program Files\Microsoft SDKs\Windows\v7.0\Include" "/I
C:\Program Files\Microsoft Visual Studio 9.0\VC\include" "/IC:\Program Files\Mic
rosoft Visual Studio 9.0\VC\atlmfc\include" "/IC:\Program Files\Microsoft Platfo
rm SDK for Windows Server 2003 R2\include" /I. /Ikroll /Ibuild\win32\sdk\include
<exec executable="cmd" dir="${win.ti.sdk.dir}">
<arg line="/c" />
<arg value="python tibuild.py -v -n -o win32 -t bundle -a ${win.ti.sdk.dir} -s ${ti.base.dir} -d ${absolute.build.dir} ${absolute.build.dir}/tmp" />
</exec>
define(["dojo", "dojox", "dojo/dnd/Selector"], function(dojo, dojox) {
return dojo.declare(
'dojox.dnd.Selector',
dojo.dnd.Selector,
{
conservative: true,
isSelected: function(node) {
// summary:
// checks if node is selected
@seanoshea
seanoshea / canvas_impossible
Created June 30, 2011 23:45
Is this possible with Canvas
<!doctype>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"></script>
<style>
#page {
width:100%;
height:100%;
background:#2B2B2B;
}
@seanoshea
seanoshea / gist:1112045
Created July 28, 2011 17:29
Dnd Titanium 1.1 Desktop not firing drop event
<html>
<body>
<div style="border:1px solid black;height:200px;width:200px;" id="divdrop">drop file(s) here</div>
<script type="text/javascript">
var target=document.getElementById('divdrop');
target.addEventListener('dragenter', function(event) {
event.preventDefault();
@seanoshea
seanoshea / gist:1269138
Created October 7, 2011 00:42
SC Application Create
var KT = SC.Application.create({
ready: function() {
this._super();
// should probably create some controllers, panes etc here.
},
rootElement: "#root"
})
@seanoshea
seanoshea / gist:1445123
Created December 7, 2011 22:47
Simple Backbone Model/View
window.PhotoPageModel = Backbone.Model.extend({
defaults: function() {
return {
index: 0,
enabled: true,
active: false
};
},
setActive: function() {