Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
(function($, window, document){
$(document).ready(function(){
$(window).blur(function(){
$('h1').text("Cambio il titolo al blur");
});
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
stepping : 5
microcode : 0x16
cpu MHz : 2266.747
cache size : 8192 KB
physical id : 0
module.exports = exports = {
create : function(notCachedClient){
var cachedClient = {};
var cache = {};
Object.keys(notCachedClient).forEach(function(method){
cachedClient[method] = function(){
var args = Array.prototype.slice.call(arguments),
cb = args.pop();
@lele85
lele85 / alloy.jmk
Created December 6, 2013 13:52
Task Alloy generazione assets
task("pre:compile",function(event,logger){
/*COMPILA GLI ASSETS*/
var exec = require('child_process').exec;
function puts(error, stdout, stderr) {
logger.info("---- GENERAZIONE ASSETS COMPLETATA ----");
}
exec("cd assets_src && ./convert.sh", puts);
});
@lele85
lele85 / convert.sh
Created December 6, 2013 13:53
Script di conversione immagini
#!/bin/bash
DEST_IPHONE="../app/assets/iphone/images/"
DEST_ANDROID="../app/assets/android/images/"
if [ $# -gt 0 ]
then
PARAMETRO=$1
else
PARAMETRO='vuoto'
var path = require("path");
module.exports = new function() {
// local values
/*******************************************************************************/
/*
local values used for defining the required properties (IE: you can change this section to
taste by adding or removing values if desired)
/*
* Appcelerator Titanium Mobile
* Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
module.exports = new function() {
var finish;
var valueOf;
/*
* Appcelerator Titanium Mobile
* Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
var suites = [
{name: "analytics"},
{name: "blob"},
LI> start --suite=timeout
harness deleted
harness does not exist, creating
temp ios harness dir already exist
harness created
harness updated with template
harness suites updated
harness tiapp.xml updated
app.js updated for harness
running iOS simulator version 7.0
exports.open = function(f) {
try {
Ti.Android.currentActivity.startActivity(Ti.Android.createIntent({
action : Ti.Android.ACTION_VIEW,
type : 'application/pdf',
data : f.getNativePath()
}));
f = null;
} catch (err) {
f = null;