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
declare type Curry<P, V> = | |
P extends [infer A, infer B, infer C, infer D] ? (a: A) => Curry<[B, C, D], V> : | |
P extends [infer A, infer B, infer C] ? (a: A) => Curry<[B, C], V> : | |
P extends [infer A, infer B] ? (a: A) => Curry<[B], V> : | |
P extends [infer A] ? (a: A) => V : | |
() => V; // could be unknow, but this allows to safely pass parameterless functions | |
declare function curry<T extends any[], R>(fn: (...args: T) => R): Curry<T, 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
// Builders | |
class SimpleBuilder { | |
constructor(private current = {}) { | |
} | |
prop(key: string, value: any) { | |
return new SimpleBuilder({ ...this.current, ...{ [key]: 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
<template> | |
<require from="nav-bar.html"></require> | |
<require from="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></require> | |
<nav-bar router.bind="router"></nav-bar> | |
<div class="page-host" style="margin-top:50px"> | |
<router-view></router-view> | |
</div> | |
</template> |
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
require.config({ | |
paths: { | |
'rest': '/webjars/Rest/' + webjars.versions['Rest'], | |
'when': '/webjars/when-node/' + webjars.versions['when-node'] | |
}, | |
map: { | |
'rest': { | |
'when': 'when/when', | |
'when/lib':'when/lib' | |
} |
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
server { | |
access_log /var/logs/nginx/a/access.log; | |
error_log /var/logs/nginx/a/error.log; | |
listen 443 ssl; | |
server_name ServiceA.local.io; | |
location / { | |
proxy_pass http://10.0.0.2$request_uri; | |
} |
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
ENV NGINX_SERVICES_A_ADDRESS 10.0.0.2 | |
ENV NGINX_SERVICES_A_NAME ServiceA | |
ENV NGINX_SERVICES_A_SHORTNAME a | |
ENV NGINX_SERVICES_B_ADDRESS 10.0.0.3 | |
ENV NGINX_SERVICES_B_NAME ServiceB | |
ENV NGINX_SERVICES_B_SHORTNAME b |
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
from busybox | |
VOLUME /var/shared | |
RUN touch /var/shared/placeholder | |
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
module Data.Experiments where | |
import Data.Array | |
import Data.Foldable | |
import Data.Path | |
import FileOperations | |
onlyFiles :: Path -> [Path] | |
onlyFiles (Directory name paths) = [] | |
onlyFiles _ = [] |
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
module Data.Experiments where | |
import Math | |
import Data.Array | |
import Control.MonadPlus | |
(..) :: Number -> Number -> [Number] | |
(..) = range | |
triples :: Number -> [[Number]] | |
triples n = do |
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
"use strict"; | |
var Prelude = require("Prelude"); | |
var Math = require("Math"); | |
var isEven = function (__copy__36) { | |
var _36 = __copy__36; | |
tco: while (true) { | |
if (_36 === 0) { | |
return false; | |
}; | |
if (_36 === 1) { |
NewerOlder