When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
float[][] result; | |
float t, c; | |
float ease(float p) { | |
p = c01(p); | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
p = c01(p); |
#include <time.h> // Robert Nystrom | |
#include <stdio.h> // @munificentbob | |
#include <stdlib.h> // for Ginny | |
#define r return // 2008-2019 | |
#define l(a, b, c, d) for (i y=a;y\ | |
<b; y++) for (int x = c; x < d; x++) | |
typedef int i;const i H=40;const i W | |
=80;i m[40][80];i g(i x){r rand()%x; | |
}void cave(i s){i w=g(10)+5;i h=g(6) | |
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
const compose = (f, g) => x => f(g(x)) | |
const Id = x => | |
({ | |
fold: f => f(x), | |
map: f => Id(f(x)) | |
}) | |
Id.of = Id | |
const Tuple = (_1, _2) => |
const { Pred, mconcat, isArray, not, isEmpty, safe } = require('crocks') | |
const pred = | |
mconcat(Pred, [ not(isEmpty), isArray ]) | |
// maybeArray : a -> Maybe [] | |
const maybeArray = | |
safe(pred) | |
console.log(maybeArray([ 1, 2 ])) // Just [ 1, 2 ] |
--compilers js:./test/support/compiler | |
--require ./test/support/init |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
A list of Sketch plugins hosted at GitHub, in no particular order.
/** | |
* ReactJS: JavaScript like you've always done it. | |
* | |
* This example renders your top ten most followed friends/followers, `filter`ing | |
* only your favorites, and putting a star on all verified accounts. | |
* | |
* With ReactJS, any time your data changes, the UI is always brought up to date | |
* automatically. If friends length changes, or followCount - it always shows what | |
* `render` describes. | |
*/ |