Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Johannes Stein frostney

I may be slow to respond.
Block or report user

Report or block frostney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
frostney / talk.markdown
Last active Sep 4, 2017
ReactiveConf 2017 Lightning talk
View talk.markdown

This is a lightning talk proposal for ReactiveConf 2017:

The Curious Case of Monorepos

Monorepos have often stigmatized as bad practice and as such something that should be avoided. Still, big companies like Facebook, AirBnB and Google are actively using monorepos to manage their projects. In the open source world, monorepos have become more popular with Babel being the most prominent example. We'll dive into why monorepos might have this bad reputation and go into where it makes sense to have monorepos, talk about their advantages and their shortcomings. We'll also look into what tooling solutions are available - especially in a JavaScript context.

frostney / YoutubePlayer.js
Created May 20, 2017
Failed experiment of trying to render Youtube iframes as videos for react-vr. Fails because of cross origin iframes :(
View YoutubePlayer.js
import YoutubePlayer from 'youtube-player';
import html2canvas from 'html2canvas';
export default class YoutubeVideoPlayer {
onMediaEvent: ?(any) => void;
videoElement: HTMLVideoElement;
_muted: boolean;
_volume: number;
static supportedFormats: ?Array<string> = ['youtube'];
View settings.json
// Place your settings in this file to overwrite the default settings
"window.zoomLevel": 1,
"workbench.iconTheme": "vscode-icons",
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.fontLigatures": true,
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true,
"eslint.autoFixOnSave": true,
frostney / talk.markdown
Last active Sep 22, 2016
ReactiveConf 2016 Lighting talk proposal: React (Native) and the cross platform pipe dream
View talk.markdown

This is a lighting talk proposal for ReactiveConf 2016:

React (Native) and the cross platform pipe dream

Have one codebase, target all the platforms. While we are on the topic on re-using the same codebase, maybe we could even switch out the renderer with what is the fatest for the situation. Use DOM, Canvas or OpenGL whenever needed. This lighting talk will give impulses on how to approach this mantra and what advantages and disadvantages we might run into in the process.

(Content-wise this lighting talk is a shorter version of

frostney / gist:bd1092e27ea3de299458
Created Nov 7, 2015
Trying to figure out a way to load directories through webpack programmatically
View gist:bd1092e27ea3de299458
module.exports = function(folder, regex) {
if (folder == null) {
folder = './';
if (regex == null) {
regex = /\.(js|json|jsx)$/;
var req = require.context(folder, false, regex);
frostney / gist:5577ab66c05bc8ada747
Last active Aug 29, 2015
Storypoints Measurement
View gist:5577ab66c05bc8ada747


My plan is to create some kind of general storypoint measurements which I can either use in my private or freelance projects, at my current company or both. I want to get away from estimating story points through having a certain feel or relying too much on the experience of previous user stories. The goal is to be able to apply a general pattern to simplify estimation and planning poker. Instead of discussions like "I just feel it's a 3" or trying to find a correlation between the length of a user story and its size, the engineering team (or even managers with programming experience) can categorize the user story (and their tasks).


1 Storypoint: Multiple or a single small surgical modifications
Example: Layout modifications, Typo fixes, micro bug fixes

frostney / gist:78c9f6ceb70da39f4107
Last active Aug 29, 2015
Event Emitter experiment (<160 characters)
View gist:78c9f6ceb70da39f4107
// Originally, I wanted to a simple Node.js Event Emitter-style object in less than 150 characters, but it just wouldn't fit
Couple of thoughts
* The name Emitter shouldn't be changed
* `var` is missing, so it's directly bound to `window` and we're saving characters (Yeah for using a JS bad practice to our advantage)
* While `e` as the property isn't really amazing, it's just there to use as little characters as possible
* Obviously, there is no checking if the events really exist
* With ES6, method shorthands and arrow functions it would be considerably less than 150 characters
frostney / mixin.js
Created Apr 7, 2015
React mixins with decorators
View mixin.js
var ReactMixin = function(...mixins) {
return function(Component) {
mixins.forEach(function(mixin) {
Object.keys(mixin).forEach(function(methodName) {
const methodValue = mixin[methodName];
if (methodName === 'statics') {
Object.keys(mixin.statics).forEach(function(staticProp) {
const staticValue = mixin.statics[staticProp];
View gist:9cdc735cc1e26487328e
(function(root) {
var modules = {};
var cache = {};
root.require = function(name) {
if (!, name)) {
var module = {
id: name,
frostney / gist:e2acfbd98d4a4e9c1024
Created Feb 15, 2015
propertyValue: Gets a value from deep/nested objects
View gist:e2acfbd98d4a4e9c1024
var propertyValue = function(obj, key, separator = '.') {
var keyArray = key.split(separator);
var result = obj;
for (var i = 0, j = keyArray.length; i < j; i++) {
(function(name) {
result = result[name];
You can’t perform that action at this time.