Skip to content

Instantly share code, notes, and snippets.

52.90.212.172
ssh [email protected] -i ~/dev/coral/env/coral-admin.pem
curl ec2-52-90-212-172.compute-1.amazonaws.com -i ~/dev/coral/env/coral-admin.pem
http://54.224.33.187:3142
sudo apt-get update
sudo apt-get install git
lsof -i tcp:16180 | awk 'NR>1 {print $2}' | xargs kill
lsof -i tcp:16181 | awk 'NR>1 {print $2}' | xargs kill
lsof -i tcp:16182 | awk 'NR>1 {print $2}' | xargs kill
echo "Launching the Coral Platform"
echo "Repo: https://github.com/coralproject/shelf"
echo ""
echo "Requirements:"
echo "GOPATH must be set"
echo "GOBIN must be set"
echo "mongod must be installed"
echo ""
if [ ! -d "$GOPATH/src/github.com/coralproject/shelf" ]; then
@jde
jde / items_view
Last active October 7, 2016 18:42
Proposed item relationship format for views
// This is a proposed format for representing relationsips in items when
// they are rendered into views. This optimizes both for transport and
// lookup efficiency on the front end.
// compacting rels into arrays of keys in hashes with the name of the rel as the key will:
// 1) allow lookups on the fe without needing to iterate
// 2) compact the data into the tightest possible (with json at least) format for transport
{
_id: "23423423",
@jde
jde / ComponentIndex.js
Created August 8, 2016 23:59 — forked from davidgljay/ComponentIndex.js
Pattern for dynamically loading React components based on a config json object.
import config from '../config'
let components = {}
//For each component in the config fiel into an object
for (var i = config.length - 1; i >= 0; i--) {
components[config[i].name] = require(config[i].path).default
}
export default components
@jde
jde / gist:140ac8d2a0c08e4bdd21
Created February 29, 2016 19:11
Comment stats protoype
collection = user_statistics
status []
user_statistics.statstics.comments.[dimension].[CommentStatus].[Field]
<!-- container element, a ul->li element structure will be injected into this by the nyt5 framework. Note the data-shares param that holds which share tools to bring in -->
<span aria-label="tools" role="group" class="share-container" data-shares="google|,facebook|,twitter|,linkedin|"></span>
<script>
// require the foundation
require(['foundation/main'], function () {
// require share-tools-container (should be in a nested require statement, not in same require as foundation)
require([
'jquery/nyt',
@jde
jde / gist:6054684
Created July 22, 2013 15:20
close app
var closeApp = function () {
var gui = require('nw.gui');
var win = gui.Window.get();
win.close(true);
}
NYTD = {};
NYTD.EventTracker = (function () {
'use strict';
var etHost;
var lastEventTime = 0;
var nextCallbackNum = 0;
var wtMetaExcludes = {
'wt.z_nyts': 1,
'wt.z_nytd': 1,
'wt.z_ref': 1,