Skip to content

Instantly share code, notes, and snippets.

View marshallswain's full-sized avatar
😄

Marshall Thompson marshallswain

😄
View GitHub Profile

Cordova: Running an ios app in a specific ios emulator

You need two flags when specifying which target to emulate. Also, do not include the version number on the end.

Find out what emulator images are available. Again, take into account that the version number will not be included when specifying the target in the cordova call.

./platforms/ios/cordova/lib/list-emulator-images

iPhone-5, 10.3
@marshallswain
marshallswain / app.js
Created April 3, 2017 17:46 — forked from silvestreh/app-index.js
Integrate Nuxt into Feathers
// src/app.js
/**
* There's not much to do here. Just remove or comment out
* the lines that use feathers.static (the public/ directory)
*/
app.use('/', feathers.static(app.get('public'))); // Find and remove this line
<script src="../node_modules/steal/steal.js">
window.rerun = true;
function rerunIfSuccessful() {
var result = document.getElementById('qunit-testresult');
var failed = result.getElementsByClassName('failed');
if (!failed.length) {
setTimeout(rerunIfSuccessful, 4000);
} else if (failed[0].innerHTML === "0" && window.rerun) {
@marshallswain
marshallswain / feathersjs-auth0.js
Created June 4, 2016 20:49 — forked from theevangelista/feathersjs-auth0.js
A hook to populate an user from Auth0 into feathersjs
const request = require('request-promise');
const errors = require('feathers-errors');
const options = {
idField: 'sub',
issuer: 'iss'
};
module.exports = function() {

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

var each = function(arr, cb){
var i = 0, len = arr.length;
for(; i < len; i++) {
if(cb(arr[i]) === false) {
return;
}
}
};
var baseImport = System.import;