Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am davidgljay on github.
  • I am davidgljay (https://keybase.io/davidgljay) on keybase.
  • I have a public key whose fingerprint is BAD0 A5AD 1163 CBEF 3DEE B58E B4A2 D8B9 FF4B 4464

To claim this, I am signing this object:

@davidgljay
davidgljay / nametag_badge.sol
Created May 19, 2016 12:57
Nametag Badge Contract
contract Badge {
//This should be consistent across all copies of this badge.
//If the title is changed, each user can decide whether to use the new title.
//Also, these should all be linked lists if possible.
string[] titles;
//Idea: the person receiving the badge receives a unique name for that badge.
//This makes it easy to id them across rooms, even if they use different names.
//These badge names can go into the default names listed.
@davidgljay
davidgljay / ComponentIndex.js
Last active June 12, 2022 19:22
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
@davidgljay
davidgljay / Talk.js
Last active September 21, 2016 20:22
Coral Dynamic Config Proposal
import React from 'react';
import { connect } from 'react-redux';
import Radium from 'radium';
import {RootContainer, Container, MapContainer} from 'react-dynamic-containers';
@connect(state => state.playground)
@Radium
class Preview extends React.Component {