Skip to content

Instantly share code, notes, and snippets.

View josx's full-sized avatar

José Luis Di Biase josx

View GitHub Profile
var nba = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../data/nba.json'
});
var nhl = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../data/nhl.json'
@josx
josx / gist:bf6f2aa44e8cf95f9651
Last active August 29, 2015 14:27
Simple remote method
'use strict';
module.exports = function(Coupon) {
Coupon.isGrabbedASIN = isGrabbedASIN;
function isGrabbedASIN(productId, userId, cb) {
Coupon.findOne(
{ where:
{
and: [
@josx
josx / 010_remove_gz_files.js
Created January 14, 2016 20:21
Cordova Before build hook removing gz files (because aapt problem on compiling)
#!/usr/bin/env node
/**
* Lets clean up some files that conflicts with aapt.
* https://osvaldojiang.com/p/137
* https://github.com/driftyco/ionic/issues/4584
* http://stackoverflow.com/questions/4666098/why-does-android-aapt-remove-gz-file-extension-of-assets
* https://forum.ionicframework.com/t/android-build-failed-ionic-cordova-unable-to-add-asset-file-file-already-in-archive/41146
*/