Skip to content

Instantly share code, notes, and snippets.

import HSStageScene from './hs_stage_scene';
class HSStageObject {
viewProps(): HSViewProps {
return {
stageHeight: HSStageScene.stageHeight
};
}
}

Uppy Server is the server side component for Uppy. It is currently built with the Koa framework for Node.js.
The purpose of Uppy Server is to interface with third party APIs and handle remote file uploading from them.

How it works

oAuth with Grant, Sessions

Uppy Server uses an oAuth middleware library called Grant to simplify oAuth authentication. Inside of config/grant.js, you configure the oAuth providers you wish to use, providing things like client key, client secret, scopes, and the callback URL you wish to use. For example:

var openpgp = require('openpgp'); // use as CommonJS
var path = require('path');
//var __dirname = '/home/evan/Documents/jeff/node/jb';
var worker_path = path.join(__dirname, 'node_modules', 'openpgp','worker', 'worker.js');
openpgp.initWorker({ path: worker_path }); // set the relative web worker path
openpgp.config.aead_protect = true; // activate fast AES-GCM mode (not yet OpenPGP standard)
var fs = require('fs');
React Native CLI commands:
# overview
/**
* Used arguments:
* -v --version - to print current version of react-native-cli and react-native dependency
* if you are in a RN app folder
* init - to create a new project and npm install it
* --verbose - to print logs while init
* --version <alternative react-native package> - override default (https://registry.npmjs.org/react-native@latest),
loadVideoById("bHQqvYy5KYo", 5, "large")
@hedgerh
hedgerh / BSTree.cpp
Last active March 11, 2016 06:11
A Binary Search Tree implementation I wrote in Sophomore year Data Structures
/**
*
* Implementation of the Binary Search Tree Class
*
* @file BSTree.cpp
* @author Harry Hedger
* @date October 7, 2012
*
**/
foo = [{ order: 1 }, { order: 2 }, { order: 3 }, { order: 4 }]
# First Attempt
nextPage = foo.select{ |f| f.order == current.order+1 } || foo.select{ |f| f.order == 1 }
# Second Attempt
nextPage = foo.select{ |f| f.order == current.order+1 || f.order == 1 }
@hedgerh
hedgerh / link-button.css
Created February 17, 2016 03:59
Styles to make a button look like a hyperlink
NVCC=nvcc
###################################
# These are the default install #
# locations on most linux distros #
###################################
OPENCV_LIBPATH=/usr/local/Cellar/opencv/2.4.9/lib
OPENCV_INCLUDEPATH=/usr/local/Cellar/opencv/2.4.9/include
for f in ../src/locales/*.js; do
echo $f
done