This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// library or otherwise | |
// { | |
type Func<T, TResult> = (value: T) => TResult; | |
type Predicate<T> = Func<T, boolean>; | |
function compose<TIn, TMiddle, TOut>(f: Func<TMiddle, TOut>, g: Func<TIn, TMiddle>) { | |
return (value: TIn) => f(g(value)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ANILIST-COVERS=LRG} | |
{ANILIST-POPUP} | |
body { | |
background-color: hsl(217, 23%, 16%); | |
} | |
/**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ANILIST-COVERS=LRG} | |
{ANILIST-POPUP} | |
body { | |
background: #222; | |
} | |
.list_wrapper { | |
margin-left: 0; | |
max-width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ANILIST MODIFIERS */ | |
{ANILIST-COVERS=LRG} | |
/* ACTUAL CASCADING STYLE SHEETS -- Explore it all to find DISABLED FEATURES you might want enabled (or not, what do I know) */ | |
@import "http://fonts.googleapis.com/css?family=Maven+Pro"; /* Custom font, feel free to delete if you don't want it */ | |
body { | |
background-color: #333; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#container-main {perspective: 1px; height: 100vh; margin-left: -100px; padding-left: 150px; overflow-x: hidden; overflow-y: auto;} | |
#container-main::before { | |
content: ""; | |
display: block; | |
width: 100%; | |
margin-left: -100px; | |
position: absolute; | |
background: url(http://40.media.tumblr.com/fbba87d327660462c8e834e164c526ca/tumblr_mzdgx16SIq1qfu9ibo3_540.jpg) top; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'lodash/fp' | |
const response = { | |
"Title": "Pulp Fiction", | |
"Year": "1994", | |
"Rated": "R", | |
"Released": "14 Oct 1994", | |
"Runtime": "154 min", | |
"Genre": "Crime, Drama", | |
"Director": "Quentin Tarantino", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GTK = func => (...args) => { | |
let result; | |
const self = (...args) => result(...args); | |
result = func(self)(...args); | |
return result; | |
} | |
var applyMiddlewares = GTK(enhancedDispatch => (middlewares, dispatch, getState) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ThemeColor = string; | |
type Theme = { id: number, color: ThemeColor } | |
type State = { themes?: [Theme] } | |
interface CurriedFunction1<T1, R> { | |
(t1: T1): R; | |
} | |
interface CurriedFunction2<T1, T2, R> { | |
(t1: T1): CurriedFunction1<T2, R>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ThemeColor = string; | |
type Theme = { id: number, color: ThemeColor } | |
type State = { themes?: [Theme] } | |
type ExtractFirstArgument<T> = | |
T extends (T1: infer T1) => infer R | |
? (T extends (t1: infer T1, t2: infer T2, t3: infer T3) => infer R | |
? Extract<T2, undefined> extends never | |
? () => R | |
: (Extract<T3, undefined> extends never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const defaultMiddleware = next => (...args) => next(...args) | |
const compose = (() => { | |
const base = (f, g) => (...args) => f(g(...args)); | |
return (...funcs) => funcs.reduce(base) | |
})(); | |
const applyMiddlewares = (middlewares, func) => compose(...middlewares)(func); | |
const recursive = (func, middlewares = [defaultMiddleware]) => { |