Skip to content

Instantly share code, notes, and snippets.

View bdkent's full-sized avatar

Brian Kent bdkent

  • Engineer @ Coursera
  • USA
  • 00:34 (UTC -04:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bdkent on github.
  • I am bdkent (https://keybase.io/bdkent) on keybase.
  • I have a public key ASCC4S5kLYGNG8KXjNCkypge0zCisKgZoQ5qjXHNwFx50go

To claim this, I am signing this object:

@bdkent
bdkent / table.jsx
Created April 21, 2017 22:10
trying to use a react-virtualized table
<div style={ {height: '500px'} }>
<AutoSizer>
{
function (props) {
var height = props.height;
var width = props.width;
return (
<Table height={height} width={width} rowCount={rowCount} rowHeight={25} headerHeight={50}
className="table" rowGetter={rowGetter}>
@bdkent
bdkent / createFullWidthMasonry.jsx
Last active February 10, 2019 21:46
react-virtualized <AutoSizer> + <Masonry>
var DEFAULT_CELL_HEIGHT = 250;
var DEFAULT_CELL_SPACING = 10;
function createFullWidthMasonry(props) {
var cellSpacing = props.cellSpacing || DEFAULT_CELL_SPACING;
var cellHeight = props.cellHeight || DEFAULT_CELL_HEIGHT;
var keyMapper = props.keyMapper || _.identity();
@bdkent
bdkent / Converter.scala
Last active February 18, 2016 04:17
base -2 converter
import scala.collection.mutable.ListBuffer
import scala.annotation.tailrec
object Converter {
type Base = Int
type Bit = Boolean
def toBit(i: Int): Bit = {
i match {
@bdkent
bdkent / tour-starter-hack-example.html
Last active December 5, 2015 03:26
Tour Starter Hack
<div ui-tour ... >
<tour-starter tour="tour" delay-ms="2000"></tour-starter>
...
</div>
$ brew gist-logs camlp5
https://gist.github.com/4a1b4ba362a53f710174