Setup:
$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})
| #!/bin/sh | |
| # | |
| # init.d script with LSB support. | |
| # | |
| # Copyright (c) 2007 Javier Fernandez-Sanguino <[email protected]> | |
| # | |
| # This is free software; you may redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as | |
| # published by the Free Software Foundation; either version 2, | |
| # or (at your option) any later version. |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| var assert = require('assert') | |
| console.log('\n==========='); | |
| console.log(' mongoose version: %s', mongoose.version); | |
| console.log('========\n\n'); |
| <!DOCTYPE html> | |
| <html lang='en'> | |
| <head> | |
| <script> | |
| var Keen=Keen||{configure:function(e){this._cf=e},addEvent:function(e,t,n,i){this._eq=this._eq||[],this._eq.push([e,t,n,i])},setGlobalProperties:function(e){this._gp=e},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e)}};(function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://":"http://")+"dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(); | |
| // Configure the Keen Client | |
| Keen.configure({ | |
| projectId: "<your project ID>", |
Grab the client and server packages from the FoundationDB website
ansible -i inventory digital_ocean -a "wget https://foundationdb.com/downloads/f-nbxofdxnoxocd/I_accept_the_FoundationDB_Community_License_Agreement/key-value-store/2.0.9/foundationdb-clients_2.0.9-1_amd64.deb https://foundationdb.com/downloads/f-nbxofdxnoxocd/I_accept_the_FoundationDB_Community_License_Agreement/key-value-store/2.0.9/foundationdb-server_2.0.9-1_amd64.deb"
Install the client and server packages
| with | |
| dau as ( | |
| -- This part of the query can be pretty much anything. | |
| -- The only requirement is that it have three columns: | |
| -- dt, user_id, inc_amt | |
| -- Where dt is a date and user_id is some unique identifier for a user. | |
| -- Each dt-user_id pair should be unique in this table. | |
| -- inc_amt represents the amount of value that this user created on dt. | |
| -- The most common case is | |
| -- inc_amt = incremental revenue from the user on dt |
| #!/usr/bin/env node | |
| // Generate a graphviz (graphviz.org) .dot file for the package relationships | |
| // of the currently running N|Solid instances, using the N|Solid 1.3 | |
| // package_info command. | |
| 'use strict' | |
| var fs = require('fs') | |
| var path = require('path') |
| import React from 'react' | |
| import { observer } from 'mobx-react' | |
| function ArtistList({ uiState: { artistData } }) { | |
| const { data } = artistData; | |
| if ( !data || !data.artists || !data.artists.length ) { | |
| return <div>No artists bruh.</div> | |
| } | |
| const { artists } = data | |
| return ( |
| const { | |
| Client, | |
| Signature, | |
| cryptoUtils, | |
| } = require('dsteem'); | |
| const client = new Client('https://api.steemit.com'); | |
| const args = process.argv.slice(2); |