This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const baseQuery = q.Paginate(q.Match(q.Index(indexName), terms)); | |
// or | |
// const baseQuery = q.Paginate(q.Collection(collectionName)) | |
const expandedQuery = q.Map(baseQuery, (ref) => | |
q.Let( | |
{ | |
instance: q.Get(q.Var('ref')) | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function JSON_to_URLEncoded(element,key,list){ | |
var list = list || []; | |
if(typeof(element)=='object'){ | |
for (var idx in element) | |
JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list); | |
} else { | |
list.push(key+'='+encodeURIComponent(element)); | |
} | |
return list.join('&'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const Now = require('now-client'); | |
const now = Now(); // this looks like it detect the token from ~/.now.json or the env automatically | |
const pkg = require(process.cwd() + '/package.json'); | |
now.getDeployments().then(res => { | |
const [latest, prev, ...rest] = res.filter(_ => _.name === pkg.name).sort((a, b) => b.created - a.created); | |
console.log(`getting alias for ${prev.uid} (${prev.url})`); | |
return now.getAliases(prev.uid).then(res => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Made by ciara.io for Meteor Academy */ | |
body { | |
color: #333; | |
font-family: sans-serif; | |
font-size: 115%; | |
line-height: 24px; | |
} | |
footer { |