Skip to content

Instantly share code, notes, and snippets.

View EugeneN's full-sized avatar
🌎

Eugene EugeneN

🌎
View GitHub Profile
@EugeneN
EugeneN / test.yaml
Last active December 19, 2015 11:29 — forked from AlexMost/test.yaml
modules:
- build: Cafe.build
- minify: Cafe.minify
- banner: Cafe.banner
- wrapper: Cafe.commonjswrapper
build :
sequence: !do |
recipe <= get-recipe@build 'recipe.yaml'
cache <- get-cache@build
<form id="create-order-form" method="post" name="create_order_form" novalidate=""
data-extend="CreateOrderForm"
data-subscribe='on-fields-change : validate'
data-coform-validator-type='server-side'>
<div class="h-mb-20">
<select id="dd_payment_option"
name="dd_payment_option"
data-extend="SimpleDropdown "
data-subscribe=' on-error@create-order-form "dd_payment_option" : show-error
@EugeneN
EugeneN / gist:5228153
Created March 23, 2013 15:45
gistfile1.coffee
```
var protocol = require('protocol/core').protocol
var Adapter = protocol
'*guard*': (ctx) -> ?
match: [ protocol, ctx]
get_deps: [protocol, ctx]
get_sources: [protocol, ctx]
...
@EugeneN
EugeneN / gist:5215941
Last active December 15, 2015 06:19
gistfile1.factor
```
<button
style="padding: 4px; display: block;"
data-subscribe=
' click : ->->->
| disable
| text! "Working..."
| ["Hello DNA" 1 ( ->->->
| 123 | warn
| "zzz" | ->->-> | stop? "not-zzz"
@EugeneN
EugeneN / gist:4267444
Created December 12, 2012 12:42
Continuation monad. Working example: http://jsfiddle.net/n6GHF/10/
# http://jsfiddle.net/n6GHF/10/
say = (m...) ->
document.write "<div>Got result: #{m.join ', '}</div>"
console.log m...
identity = (x) -> x
log_result = (x...) -> say x...
@EugeneN
EugeneN / gist:4225334
Created December 6, 2012 15:29
Currency monad
# mv = [currency amount]
# v = "$ 123"
rates =
'$': 8
'E': 10
'R': 0.25
'U': 1
'T': 123