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
// Just made it as an exercise for point-free ramda | |
> const R = require('ramda') | |
> const pfRng = R.compose(R.partial(R.times(R.compose(Math.floor, R.converge(R.multiply, [R.identity, Math.random])))), R.of) | |
> pfRng(20)() | |
[ 0, 0, 1, 1, 0, 2, 2, 2, 6, 2, 6, 10, 9, 6, 13, 6, 2, 5, 14, 6 ] |
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
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.Cycle=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define("@most/dom-event",["exports","most"],factory);else if("undefined"!=typeof exports)factory(exports,require("most"));else{var mod={exports:{}};factory(mod.exports,global.mo |
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
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.DOM = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (global, factory) { | |
if (typeof define === "function" && define.amd) { | |
define('@most/dom-event', ['exports', 'most'], factory); | |
} else if (typeof exports ! |
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
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.HTTP = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (global, factory) { | |
if (typeof define === "function" && define.amd) { | |
define('@most/hold', ['exports', 'most/lib/source/MulticastSource'], factory); | |
} el |
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
// playing around with "where" clause functionality for JS | |
const def = fn => ({ | |
where: obj => (function(obj) { | |
Object.keys(obj).forEach(key => this[key] = obj[key]) | |
fn() | |
})(obj) | |
}) | |
def(() => { | |
console.log(a + 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
const tmpl = string => new Function('return `'+ string +'`')() | |
const name = 'foo' | |
tmpl('hello ${name}!') |
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
(ns callback-to-core-async.core | |
(:require-macros [cljs.core.async :refer go]) | |
(:require [ajax.core :refer [GET]] | |
[cljs.core.async :refer [<! put! chan]])) | |
(defn http-get [url] | |
(let [out (chan) | |
handler #(put! out %1)] | |
(GET url {:handler handler :error-handler handler}) | |
out)) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="//cdn.rawgit.com/risto-stevcev/snabbdom/master/dist/snabbdom.min.js"></script> | |
<script src="//cdn.rawgit.com/risto-stevcev/snabbdom/master/dist/snabbdom_style.min.js"></script> | |
<script src="//cdn.rawgit.com/risto-stevcev/snabbdom/master/dist/snabbdom_class.min.js"></script> | |
<script src="//cdn.rawgit.com/risto-stevcev/snabbdom/master/dist/snabbdom_props.min.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//cdn.rawgit.com/risto-stevcev/snabbdom/master/dist/snabbdom.min.js"></script> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> |
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 node:4 | |
MAINTAINER Risto Stevcev | |
ENV PURESCRIPT_DOWNLOAD_SHA1 7ac8ded4bc3e2b5af378af4bed77598eb69bfde2 | |
RUN npm install -g bower pulp@8.2.1 | |
RUN cd /opt \ | |
&& wget https://github.com/purescript/purescript/releases/download/v0.8.5/linux64.tar.gz \ |