Skip to content

Instantly share code, notes, and snippets.

View jbellenger's full-sized avatar

James Bellenger jbellenger

View GitHub Profile
@jbellenger
jbellenger / README.md
Created February 11, 2023 13:50 — forked from airbnb-robot/README.md
README from the code review app.

code-review-app

An application for conducting code review interviews

Backstory

This service ensures we are following the laws of the City of Atlantis with respect to vacation rental properties. Atlantis requires that:

  • Every bookable listing within their City limits has a valid registration number. This is obtained by hosts via an in-person application process. A single registration number applies to a single property and host, regardless of which
@jbellenger
jbellenger / NamedChunksPlugin.js
Last active July 21, 2017 15:36
named chunks
// All webpack chunks have an identifier that is written to both the chunk and
// the chunk manifest.
//
// By default, webpack uses "int" identifiers, where the identifiers are
// sequentially generated after chunks are ordered by OccurenceOrderPlugin.
//
// The result of this is that small code changes may cause chunks to be
// reordered, leading to a cascading change of chunk ids, and a large number of
// chunk rehashes that could have been avoided.
//
@jbellenger
jbellenger / RawModule-test.js
Last active June 15, 2017 21:46
RawModule hash code issue
const crypto = require('crypto');
const RawModule = require('./lib/RawModule');
const hashModule = (module) => {
const hash = crypto.createHash('sha256');
module.updateHash(hash);
return hash.digest('hex');
};
const hashFoo = hashModule(new RawModule('foo'));
@jbellenger
jbellenger / 0.cabcb5.js
Created May 1, 2017 20:40
async commons chunk
webpackJsonp([0],{
/***/ "./entry.js":
/***/ (function(module, exports) {
document.getElementById('message').innerHTML = 'everything ok!';
/***/ })
@jbellenger
jbellenger / 0.160b5d9d347c0d3ec813.js
Last active April 28, 2017 22:10
async common chunk and globalized locale chunk
webpackJsonp([0],{
/***/ 11:
/***/ (function(module, exports) {
/***/ })
});
@jbellenger
jbellenger / 0.160b5d9d347c0d3ec813.js
Last active April 28, 2017 00:26
building globalize-webpack-plugin with webpack2
webpackJsonp([0],{
/***/ 11:
/***/ (function(module, exports) {
/***/ })
});

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jbellenger
jbellenger / StreamsTest.scala
Created May 16, 2015 17:04
Simple akka http client example
import akka.actor.{ActorSystem, Cancellable}
import akka.http.Http
import akka.http.model.{HttpRequest, HttpResponse, Uri}
import akka.http.unmarshalling.Unmarshal
import akka.stream.ActorFlowMaterializer
import akka.stream.scaladsl._
import akka.util.ByteString
import scala.concurrent.duration._
@jbellenger
jbellenger / scalatest+testkit: per-test ActorSystem
Last active December 18, 2015 18:19
The goal here is to create an entire akka ActorSystem for each test case with minimum boilerplate required for each test.
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite
import akka.actor._
import akka.actor.Actor.emptyBehavior
import akka.testkit.{TestKit, ImplicitSender}
class DummyActor extends Actor {
val receive = emptyBehavior
}