This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sketch = function(p) { | |
p.setup = function() { | |
p.colorMode(p.HSB, 1); | |
p.createCanvas(p.windowWidth, 100); | |
}; | |
p.draw = function() { | |
p.background(1, 1, 1); | |
p.fill(1); | |
p.rect(p.mouseX, p.mouseY, 50, 50); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ST_APP_NAME = 'SourceTree'; | |
var resize = function(windowObject, opt) { | |
opt = opt || {}; | |
opt.style = "bar-resize:screenSizeX * .6"; | |
var ST_BOOKMARKS_WIDTH = 500; | |
switch (windowObject.app().name()) { | |
case ST_APP_NAME: | |
opt.style = "bar-resize:screenSizeX - " + ST_BOOKMARKS_WIDTH; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add our keyamp from github | |
var vimBinding = document.createElement('script'); | |
vimBinding.setAttribute('src', 'https://rawgit.com/jakub-m/vim-in-textarea/master/jsvim.js'); | |
// browser support for onload may be iffy ... | |
vimBinding.onload = function () { | |
var vim = new VIM(); | |
Array.prototype.forEach.call(document.querySelectorAll('textarea'), function (instance){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vimBinding = document.createElement('script'); | |
vimBinding.setAttribute('src','https://raw.github.com/marijnh/CodeMirror/master/keymap/vim.js'); | |
var mirrors = document.querySelectorAll('.CodeMirror'); | |
// browser support for onload may be iffy ... | |
vimBinding.onload = function () { | |
Array.prototype.forEach.call(mirrors, function (instance){ | |
instance.CodeMirror.setOption('keyMap','vim'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* dbg jQuery plugin - http://jquery.5s.ro/ | |
* | |
* Easy debug of your jQuery objects. | |
* | |
* @author Gunther Konig <[email protected]> | |
*/ | |
(function($) | |
{ | |
$.dbg = function() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dbg(o) | |
{ | |
Ti.API.info(o); | |
} | |
var win = Ti.UI.createWindow({backgroundColor: '#444'}); | |
var btnProperties = { | |
backgroundImage: 'enabled.png', | |
backgroundDisabledImage: 'disabled.png', | |
width: 70, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = setTimeout(function() | |
{ | |
var alert = Titanium.UI.createAlertDialog( | |
{ | |
title: 'Timeout fired!', | |
message: '' | |
} | |
); | |
alert.show(); | |
}, 1000000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = setTimeout(function() | |
{ | |
var alert = Titanium.UI.createAlertDialog({ | |
title: 'Timeout fired!', | |
message: '' | |
}); | |
alert.show(); | |
}, 1000000); | |
var b = Ti.UI.createButton({ |