Skip to content

Instantly share code, notes, and snippets.

View andreloureiro's full-sized avatar

André Loureiro andreloureiro

  • Sao Paulo, Brazil
View GitHub Profile
@andreloureiro
andreloureiro / esnextbin.md
Created November 23, 2016 22:11
esnextbin sketch
import xs from 'xstream'
// import TeamList from '../components/TeamList'
import {button, div, ul, li, p} from '@cycle/dom'
const fakeData = [
{
name: 'Maine Road FC',
points: 40,
players: [
{
(ns knapsack.core
(:require [clojure.string :as s]))
(def item-data
["map" 9 150
"compass" 13 35
"water" 153 200
"sandwich" 50 160
"glucose" 15 60
"tin" 68 45
/*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*************************
Velocity jQuery Shim
*************************/
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity's dependency on a full copy of jQuery, and allowing it to work in any environment. */
/* These shimmed functions are only used if jQuery isn't present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */
/**********************
Velocity UI Pack
**********************/
/* VelocityJS.org UI Pack (5.0.4). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
;(function (factory) {
/* CommonJS module. */
if (typeof require === "function" && typeof exports === "object" ) {
module.exports = factory();
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
(ns nix.example
(:require [nix.core :refer [Observable run]]
[nix.dom :refer [make-dom-driver]]))
;; Checkbox Example
(defn CheckboxToggle [{:keys [DOM]}]
(let [{:keys [select]} DOM
checkbox-evs$ (:events (select "#cbox"))
checkbox-change$ (-> (checkbox-evs$ "change")
{
"ecmaVersion": 6,
"libs": ["browser"],
"loadEagerly": [
"app/**/*.js"
],
"plugins": {
"doc_comment": {
"fullDocs": true
},
(ns cards.core
(:require-macros [devcards.core :as dc :refer [defcard deftest defcard-rg]]
[clojure.set :as s])
(:require [reagent.core :as r]
[cljs.test :as t :refer-macros [is testing]]))
(enable-console-print!)
(def state (r/atom {:app/title "mimas"
:dropdown/list [{:item/id 0 :item/value :item-1 :item/label "item#1"}
(ns mimas.core
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[goog.dom :as gdom]))
(enable-console-print!)
(println "mimas")
;; --- Utils ---