Skip to content

Instantly share code, notes, and snippets.

View SanderElias's full-sized avatar

Sander Elias SanderElias

View GitHub Profile
@SanderElias
SanderElias / mySample.component.ts
Last active October 21, 2022 14:14
FantasyLand Angular
import {Component, Inputs, InputDefault, html, css} from '@angular/core'
export class MySampleComponent implements Component {
#title = "world!";
selector: 'app-my-sample-component`;
css = css`
ul {
list-style: none
}
`;
@SanderElias
SanderElias / myFunctionals.js
Created April 11, 2016 09:03
Some functional helper functions
// Functional helpers, curry and compose
function curry(fn, ...args) {
let _curry = (args) => args.length < fn.length ? (..._args) => _curry([...args, ..._args]) : fn(...args);
return _curry(args);
}
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));
const map = curry((fn, value) => value.map(fn));
const reduce = curry((fn, value) => value.reduce(fn));
// ----- end of functional helpers
@SanderElias
SanderElias / SassMeister-input.scss
Created November 12, 2014 07:30
Generated by SassMeister.com.
// ----
// libsass (v3.0.1)
// ----
$color-amber: (
'50': #fff8e1,
'100': #ffecb3,
'200': #ffe082,
'300': #ffd54f,