Skip to content

Instantly share code, notes, and snippets.

/**
* The Y-Combinator
*/
const y = fn => (f => f(f))(f => fn(x => f(f)(x)));
const factorial = y(fac => n => {
return n < 2 ? 1 : n * fac(n - 1);
});
const fibonacci = y(fib => n => {
<dimen name="text_spacing">4dp</dimen>
<dimen name="small_text">12sp</dimen>
{
"inodes": 4,
"hnodes": 16,
"onodes": 2,
"wih": {
"rows": 16,
"cols": 4,
"matrix": [
[
-1.1898033052663801,
{
"inodes": 4,
"hnodes": 16,
"onodes": 2,
"wih": {
"rows": 16,
"cols": 4,
"matrix": [
[
-0.5788905302255863,
{
"inodes": 4,
"hnodes": 16,
"onodes": 2,
"wih": {
"rows": 16,
"cols": 4,
"matrix": [
[
-0.023081422145953902,
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>versions/channels/all</id>
<title>Versions (all)</title>
<updated>2016-10-05T13:09:06Z</updated>
<link rel="alternate" href="http://download.getsmithers.com/feed/channel/all.atom"/>
<generator>Feed for Node.js</generator>
<entry>
<title type="html"><![CDATA[0.4.7]]></title>
<id>http://download.getsmithers.com/download/version/0.4.7</id>
@RobinMalfait
RobinMalfait / enhance_setstate.js
Last active September 13, 2016 21:33
I wonder if there is a way to override/enhance setState. I keep getting this error: http://d.pr/i/LVAF+ and http://d.pr/i/X2Vo+ so I wonder if this is do-able?
/**
* I want to write a HOC, that can intercept the setState functionality
*
* For some context: I'm writing a personal assistant: https://github.com/SmithersAssistant/Smithers
* and I have a plugin system, now I want to store the state of plugins into localStorage
* so that later on I can restore the state
*
* Ideally I would want something like this:
*/
const NOOP = () => {}

Much markdown

  • such
  • cool

wow

@RobinMalfait
RobinMalfait / html.css
Last active January 1, 2016 03:39
Prevents the "jump" if you go from a page with more content to another
/**
* Prevents the "jump" if you go from a page with more content to another
**/
html {
overflow-y: scroll;
}
@RobinMalfait
RobinMalfait / main.css
Created December 12, 2013 20:10
Main.css
/* CSS */
.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,