Skip to content

Instantly share code, notes, and snippets.

vanilla react tooling

This is an overview of what tools I use to build React applications in pure JavaScript. The relation between modules can best be mapped like this:

╔═════╗        ╔═════╗       ╔══════════════╗       ╔═══════╗
║ API ║<──────>║ Fax ║──────>║ Simple-store ║──────>║ React ║
╚═════╝        ╚═════╝       ╚══════════════╝       ╚═══════╝
                  ^                                     │
                  │                                     │
             ╔══════════╗                               │
 ║ Barracks ║ │
@ilyakava
ilyakava / epub.sh
Created August 2, 2015 12:02
Input an arg of a file of a list of links, get an output.epub of all those webpages concatenated
#!/bin/bash
COUNT=1
for link in $(cat $1)
do
wget -O - -o /dev/null $link | iconv -f iso8859-1 -t utf-8 > $COUNT.html
COUNT=$(echo $COUNT + 1 |bc)
done
@eleven41
eleven41 / set-github-labels.cmd
Created May 24, 2012 15:49
Set some standard Github issues labels
@echo off
echo This script creates issue labels for a GitHub repository
echo.
echo Please specify the GitHub Profile containing the Repository, e.g.:
echo https://github.com/MyProfile/MyCoolProject
echo ~~~~~~~~~
set /p username=" Enter Profile : "
echo.
echo Please specify the GitHub password for that profile:
set /p password=" Enter Password : "
@wolfg1969
wolfg1969 / tunnel.conf
Created September 6, 2012 07:05
autossh upstart conf
# tunnel - secure tunnel to my vps
description "ssh tunnel"
start on (local-filesystems and network-device-up IFACE!=lo)
stop on runlevel [!12345]
respawn
respawn limit 5 60 # respawn max 5 times in 60 seconds
umask 022
@hallvors
hallvors / zeroclipboard-html5.js
Created October 20, 2015 22:29
An experimental HTML5 version of ZeroClipboard, API not quite complete yet
(function(window, undefined) {
"use strict";
/* -------->8 above stuff is start.js */
/* -------->8 below stuff is shared/private-html5.js */
var _globalConfig = {};
var _document = window.document,
_Error = Error,
_hasOwn = window.Object.prototype.hasOwnProperty;
@splagemann
splagemann / include_when.twig
Last active March 9, 2016 18:29 — forked from karlhorky/include_when.twig
Demo of potential include_when Twig tag
{% include_when {
'config.azubiTabs': 'azubi-tabs.twig'
} %}
{% include_when {
'config.hasCustomFooter': 'layouts/#{locale()}/footer.twig',
default : 'layouts/footer.twig'
} %}
// Given:
// getFullName(id) => Promise<String>
// getAvatarId(id) => Promise<int>
// getImageById(id) => Promise<String>
// ## Using promises without unnecessary nesting makes it more obvious what
// ## request depend on what other requests (they require async data) and
// ## everything is parallelised by default.
// (Good - parallel) Promises
@karlhorky
karlhorky / autocomplete.controller.js
Last active December 21, 2016 21:39
Directive class extending with ECMAScript 6
class AutocompleteController {
constructor () {
'ngInject';
}
querySearch (query) {
return this.service.search(query);
}
selectedItemChange(item) {
@bsansouci
bsansouci / Loop-react-motion.js
Last active March 21, 2017 09:09
Example Loop component React-Motion
let Loop = React.createClass({
getInitialState() {
return {
isMovingToEnd: true
};
},
endValue(currVals) {
let {endValueProp, isDone, startValue} = this.props;
let {isMovingToEnd} = this.state;
@frostney
frostney / talk.markdown
Last active September 4, 2017 21:16
ReactiveConf 2017 Lightning talk

This is a lightning talk proposal for ReactiveConf 2017: https://reactiveconf.com/

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.