Skip to content

Instantly share code, notes, and snippets.

Juho Vepsäläinen bebraw

Block or report user

Report or block bebraw

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
View html-webpack-plugin-lite.js
/*
html-webpack-plugin-lite
Usage:
new HtmlWebpackPluginLite({
title: "Webpack demo", // Available in context
template: ({ css, js, title }) => ... html ...
}),
*/
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View HtmlPlugin.js
"use strict";
const Mustache = require("mustache");
const path = require("path");
/**
* This plugin is used to generate an html file from a mustache template.
* @param {object} options
* - enabled {boolean} whether plugin is enabled
* - outputFile {string} the relative path to the html file result
View TextField.js
/* @flow */
import React, { Component } from 'react';
import Ruler from '../Ruler/Ruler.jsx';
type Style = {
textColor?: string;
floatingLabelColor?: string;
};
@bebraw
bebraw / active.md
Created Dec 12, 2015
Most active GitHub users in Finland (2015)
View active.md

Most active GitHub users in Finland (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Fri, 12 Dec 2014 12:29:07 GMT till Sat, 12 Dec 2015 12:29:07 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
  .filter(user => user.followers > 12)
@bebraw
bebraw / .babelrc
Created Sep 4, 2015
How to configure Babel for production/development?
View .babelrc
{
"env": {
"build": {
"stage": 2
}
}
}
@bebraw
bebraw / the_story_so_far.md
Last active Aug 29, 2015
SurviveJS - Webpack and React - The Story So Far
View the_story_so_far.md

IMPORTANT! This post has been moved to http://survivejs.com/blog/the-story-so-far/ . Feel free to comment there.

SurviveJS - Webpack and React - The Story So Far

Given I'm a first time author I've done my fair share of mistakes with SurviveJS - Webpack and React. It was an attempt to change the direction of my career. Being a subcontractor's subcontractor provides income, sure, but was a dead end for me with no room to grow in an economy that keeps getting tougher. Interestingly the book has garnered a lot of attention and I believe some have found it useful. It has been bit of a disaster economically and it's hard to imagine I could keep a business like this up for long if something doesn't change.

Why SurviveJS - Webpack and React Was Written?

The first steps towards the book were taken at the end of January. I happened upon [a blog post about Webpack by Christian Alfoni](https://christianalfoni.github.io/javascript/2014/12/13/did-you-know-webpack-and-react-is-awesome.htm

@bebraw
bebraw / actions.js
Last active Oct 28, 2015
Reflux + Axios.
View actions.js
'use strict';
var Reflux = require('reflux');
var axios = require('axios');
var Actions = Reflux.createActions({
load: {
children: ['completed', 'failed']
}
});
@bebraw
bebraw / antwar_design.md
Last active Aug 29, 2015
Antwar design
View antwar_design.md

Moved to Antwar wiki

Antwar Design

In this document I'll go through a possible design/features for Antwar based on my personal needs. My goal is to port my blog (~200 posts) to run on top of Antwar. The plan is to host it on top of gh-pages. I'll want to reach feature parity with the current solution and then improve on that.

Features of the current blog

The current blog is quite simple. There's an index listing some of the recent posts (about five) in their entirety. In addition it is possible to navigate to a page of a specific post or tag.

View dev-server.js
'use strict';
var express = require('express');
var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var config = require('./config/webpack.config');
main();
You can’t perform that action at this time.