Skip to content

Instantly share code, notes, and snippets.

View FQ400's full-sized avatar
🤯
inspired.

Carsten Lamm FQ400

🤯
inspired.
View GitHub Profile
@FQ400
FQ400 / mars-rover.js
Last active August 11, 2018 15:07
Kata
// https://codurance.com/2017/11/16/katas-for-functional-calisthenics/
// Rules: https://codurance.com/2017/10/12/functional-calisthenics/
// Thoughs
// - build a field ???
// initial position
// new position function
// - parse moving string
// Pairing Session: @FQ400 @oleks-fedotov
/*
Access the global variable document
*/
const browserUrlParser1 = (url) => {
const p = document.createElement('a');
p.href = url;
return p;
}
/*
@FQ400
FQ400 / braching.js
Last active September 15, 2017 07:42
Branching in functional javascript using Ramda
import R from 'ramda';
const payloadSizeWithinLimit = (payload, limit) => limit > payload.size;
const errorState = { name: 'can not be empty' };
const sizeInBytes = 50000;
let errorObj;
errorObj = R.cond([
[R.equals(true), R.always({})],
@FQ400
FQ400 / special_german_signs.md
Created July 12, 2017 18:17
For all developers of products that are translated into german.
uppercase lowercase
Ä ä
Ö ö
Ü ü
ß
@FQ400
FQ400 / ExpandableBlock.jsx
Last active April 4, 2017 09:22
Inferno Component Unit-Test
import { linkEvent } from 'inferno';
import {
compose,
withState
} from 'incompose';
import classnames from 'classnames';
const toggle = (props) => props.toggle(!props.hidden);
const ExpandableBlock = (props) => {