UPDATE: With the assets command of the TiCons CLI / Module this can be done even simpeler by calling $ ticons assets or an alloy.ymk using:
task("pre:load", function(event, logger) {
require('ticons').assets();
});
| find . -type f | grep -v node_modules | grep -v modules | grep -v .git | grep -v .json | grep .js | xargs -I{} perl -pi -e 'print "/*\n * Copyright (c) 2011-2014 YY Digital Pty Ltd. All Rights Reserved.\n * Please see the LICENSE file included with this distribution for details.\n */\n\n" if $. == 1' {} |
| { | |
| "bitwise": true, | |
| "camelcase": true, | |
| "eqeqeq": true, | |
| "indent": 4, | |
| "unused": true, | |
| "onevar": true, | |
| "undef": true, | |
| "trailing": true, | |
| "latedef": true, |
| /** | |
| * Annotated Gruntfile. | |
| * This builds a Backbone/Marionette application using Dust.js (Linkedin fork) as a | |
| * templating system, as well as some helpers from Foundation, with Browserify. | |
| * It also configures a watcher and static server with live reload. | |
| */ | |
| module.exports = function (grunt) { | |
| // This automatically loads grunt tasks from node_modules | |
| require("load-grunt-tasks")(grunt); |
| Alloy.Globals.fa = require('fa'); |
| Alloy.isTablet = Alloy.isTablet || (Ti.Platform.model.search(/ipad/i) > -1); |
| var always = new RegExp('(?:' + ['style', 'johnny ryall', 'sabotage', 'brooklyn', 'root down'].join('|') + ')', 'gim'); | |
| function droppinScienceLikeGalileoDroppedTheOrange(lyrics) { | |
| return lyrics | |
| .replace(always, function(m, p1) { | |
| return m.toUpperCase(); | |
| }) | |
| .replace(/\b([^\s]+?)(\r\n|\n|\r|$)/g, function(m, p1, p2) { | |
| return p1.toUpperCase() + p2; | |
| }); | |
| } |
| 'use strict'; | |
| var win = Ti.UI.createWindow({ | |
| backgroundColor: 'white', | |
| }); | |
| //Generate some sample rows | |
| var rows = []; | |
| for (var iLoop=0;iLoop<100;iLoop++){ | |
| rows.push({ title: 'demo row #'+iLoop}); |
UPDATE: With the assets command of the TiCons CLI / Module this can be done even simpeler by calling $ ticons assets or an alloy.ymk using:
task("pre:load", function(event, logger) {
require('ticons').assets();
});
| #1 Generate Public & Private Keypair | |
| #2 Create receipt.json - eg below - careful with line-endings, etc if line breaks | |
| #3 Create signature & Encode | |
| openssl dgst -binary -sha1 -sign private.pem receipt.json | openssl base64 > signature.txt | |
| #4 Verify using OpenSSL & public key | |
| openssl base64 -d -in signature.txt -out signature.sha1 | openssl dgst -sha1 -verify public.pem -signature signature.sha1 receipt.json | |