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
// TESTED WITH APPCELERATOR TITANIUM 2.1.0.GA | |
// Method by Dawson Toth: | |
// http://developer.appcelerator.com/blog/2011/09/qr-codes-in-your-mobile-apps-cross-platform.html | |
function createQRCodeImageView(text, size) { | |
var url = 'http://chart.apis.google.com/chart?cht=qr&chs=' + size + '&chl=' + encodeURI(text) + '&chld=H|0'; | |
var width = size.split('x')[0], height = size.split('x')[1]; | |
if (Ti.Android) { | |
width += 'dp'; | |
height += 'dp'; |
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
// Model | |
module.SampleModel = Backbone.Model.extend({}); | |
// View | |
module.SampleView = Backbone.Marionette.ItemView.extend({ | |
template : template_string, | |
// This trigger runs only the first time. After that, "click" event is not triggered (defaults to href="#") | |
triggers : { | |
'click .reload' : 'reload' |
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
define( | |
[ | |
"backbone", "marionette", "jquery", | |
"modules/app/app", | |
"text!modules/index/templates/weather.html", | |
"text!modules/index/templates/multiple.html", | |
"text!modules/index/templates/loading.html" | |
], | |
function(Backbone, Marionette, $, App, weatherTpl, multipleTpl, loadingTpl) { | |
var module = App.module('Index'); |
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
/* --------------------------------------------------------------------------- | |
Boilerplate CSS Media Queries | |
Encoding: UTF-8 | |
Author: PaulUnd (http://www.paulund.co.uk/boilerplate-css-media-queries) | |
--------------------------------------------------------------------------- */ | |
/* =Smartphones (portrait and landscape) | |
--------------------------------------------------------------------------- */ | |
@media only screen |
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() { | |
$('#new-town').bind('pagebeforeshow', function(event) { | |
$('a.my_link').bind('click', function(event) { | |
$.ajax({ | |
contentType: 'application/x-www-form-urlencoded', | |
type: 'POST', | |
url: 'http://example.com/rest/sample', | |
data: sample_params, | |
success: function(data) { | |
console.log('Ajax request is nice!'); |
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
.hide-text { | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
} |
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
def wottam | |
"AWESOME!" | |
end |
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
Backup::Model.new(:sample_backup, 'A sample backup configuration') do | |
split_into_chunks_of 4000 | |
database MySQL do |database| | |
database.name = 'my_sample_mysql_db' | |
database.username = 'my_username' | |
database.password = 'my_password' | |
database.skip_tables = ['logs'] | |
database.additional_options = ['--single-transaction', '--quick'] |
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 a shell variable called `TM_TODO_IGNORE`, with a regEx value like: `jquery.mobile.1.0.js|phonegap.js|jquery-1.6.4.js|jquery.mobile.js` |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<widget xmlns="http://www.w3.org/ns/widgets" | |
xmlns:gap="http://phonegap.com/ns/1.0" | |
id="com.viavansi" | |
version="0.2"> | |
<!-- Info --> | |
<name>PhoneGap Sample</name> | |
<description> | |
PhoneGap API Sample |