Skip to content

Instantly share code, notes, and snippets.

(async () => {
const onDbLoad = async () => {
const output = {
indexedDb: {},
}
const server = await db.open({server: "keyval-store"})
const keys = await server.keyval.query().all().keys().execute()
for (const key of keys) {
output.indexedDb[key] = await server.keyval.get(key)
}
@paps
paps / phantombuster-launch-agent.js
Last active September 27, 2017 15:00
Simple example of how to launch a Phantombuster agent and get its result with NodeJS. Uses this API endpoint: https://hub.phantombuster.com/reference#launchagent-1
// You'll need to do
// npm install --save request
// npm install --save request-promise-native
// for this module to work
const request = require("request-promise-native")
const generateRequestOptions = (apiKey, agentId, argument) => {
return {
method: "POST",
uri: `https://phantombuster.com/api/v1/agent/${agentId}/launch`,
@paps
paps / bot.js
Created March 1, 2017 14:58
Example of a GitHub => CircleCI => Phantombuster deployment
'use strict';
'phantombuster command: casperjs';
'phantombuster dependencies: lib-Nick-beta.coffee';
'phantombuster package: 2';
var Nick = require('lib-Nick-beta');
var buster = require('phantombuster').create();
var nick = new Nick();
@paps
paps / keybase.md
Created September 22, 2014 15:32
Keybase proof

Keybase proof

I hereby claim:

  • I am paps on github.
  • I am martintapia (https://keybase.io/martintapia) on keybase.
  • I have a public key whose fingerprint is 2C73 582D E8F1 6C33 5413 4910 1008 2641 F952 C327

To claim this, I am signing this object: