Skip to content

Instantly share code, notes, and snippets.

require("crash-reporter").start({
productName: "Electron",
companyName: "Github, Inc.",
submitUrl: "http://127.0.0.1:3000/help/crashes",
autoSubmit: true
});
process.crash();
import _ from "underscore";
const baseConfigData = {
"shows": [
{
"show_id": 200,
"title": "Elevate Your Energy 2",
"site_url": "https:\/\/www.spreaker-beta.com\/show\/elevate_your_energy",
"image_original_url": "https:\/\/d1botjg6upurv.cloudfront.net\/images.spreaker-beta.com\/original\/3f6575306aabb45f8301c8093d58c518.jpg"
@lele85
lele85 / gist:4c57a475acf3b1008870
Last active August 29, 2015 14:15
Add timeout to a call in test angularjs
var backend_mock_timeout = function (par) {
angular.module('httpBackendMock', ['ngMockE2E'])
.run(function ($httpBackend) {
$httpBackend.whenGET(/.*/).passThrough();
$httpBackend.whenPOST(/check-barcode/).respond(function(){
return [0,{}];
});
$httpBackend.whenPOST(/.*/).passThrough();
});
.config(["$provide",function($provide) {
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;
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
/*
* 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"},
/*
* 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;
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)
@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'
@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);
});