Skip to content

Instantly share code, notes, and snippets.

@anthonychung14
anthonychung14 / ec2-rai-node.md
Created January 17, 2018 23:44 — forked from numtel/ec2-rai-node.md
Install rai_node on EC2 Ubuntu instance

Follow these instructions to start an EC2 instance running Ubuntu that will run rai_node on startup

  1. Select Ubuntu Server 16.04 LTS (HVM), SSD Volume Type. A t2.small or larger instance type is recommended.

  2. Configure the security group to match the screenshot.

  3. Download install_rai_node.sh below, update the URLs with their latest versions.

    Get latest rai_node archive URL from https://github.com/clemahieu/raiblocks/releases.

    Get latest gdrive-linux-x64 version URL from https://github.com/prasmussen/gdrive#downloads

import { Core, Tus10 } from 'uppy';
import runtime from 'serviceworker-webpack-plugin/lib/runtime';
export const uppy = new Core({ wait: false });
function uploaderUpdatedAction(value) {
return {
type: 'UPLOADER_UPDATED',
value
};
@anthonychung14
anthonychung14 / lodashify.js
Created October 14, 2017 01:09 — forked from khalilovcmd/lodashify.js
to import lodash into chrome dev tools console
var el = document.createElement('script');
el.src = "https://raw.githubusercontent.com/lodash/lodash/3.10.1/lodash.min.js";
el.type = "text/javascript";
document.head.appendChild(el)
// Three mostly separate examples: Adding, reading/listening, and removing multiple items from firebase
// Firebase V3.0.0
// one school has many courses and many studens
// one course has many students and is in only one school
// one student is in many courses and only one school
const db = firebase.database().ref('test');
const userId = firebase.auth().currentUser.uid;
/* -- ADDING -- */
@anthonychung14
anthonychung14 / rxjs-firebase-demo.js
Created April 13, 2017 13:53 — forked from deltaepsilon/rxjs-firebase-demo.js
Demo RxJs integration with Firebase
var Rx = require('rxjs');
var firebase = require('firebase');
firebase.initializeApp({
"databaseURL": "https://quiver-two.firebaseio.com",
"serviceAccount": "./service-account.json"
});
var ref = firebase.database().ref('rxjs-demo');
Rx.Observable.fromPromise(ref.remove())
.map(function () {