(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
var gitRepo = require('../.'); | |
var fs = require('min-fs'); | |
var run = require('gen-run'); | |
var consume = require('../stream-to-string.js'); | |
run(function* main() { | |
// Configure the repo API to work from a local clone. | |
var repo = gitRepo({ fs: fs("./my-repo") }); |
defmodule ApplicationRouter do | |
use Dynamo.Router | |
prepare do | |
# Pick which parts of the request you want to fetch | |
# You can comment the line below if you don't need | |
# any of them or move them to a forwarded router | |
conn.fetch([:cookies, :params]) | |
end |
module BorrowABook = | |
type BookLoanProblem = | |
NotInCatalogue | |
| OutOnLoan | |
| InsufficientPermission | |
| Failed of string | |
type Book = Book | |
type BookModel = BookModel |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin <branch-name> |
var If = React.createClass({ | |
render: function() { | |
return this.props.value && this.props.children; | |
} | |
}); | |
// usage | |
<If value={this.state.whatever}> | |
Stuff | |
</If> |
namespace FSharp.Data | |
open Microsoft.FSharp.Core.CompilerServices | |
open ProviderImplementation.ProvidedTypes | |
open System.Reflection | |
module internal HexParser = | |
open System.Text.RegularExpressions | |
let private getHexVal (hex: char) = |
require ('./globals')(global); // Mixed in Ramda to global here | |
var Task = require ('data.future'), | |
M = require ('control.monads'), | |
State = require ('fantasy-states'), | |
Reader = require ('fantasy-readers'), | |
Tuple2 = require ('fantasy-tuples').Tuple2, | |
Maybe = require ('data.maybe'), | |
ST = State.StateT (Task), | |
App = Reader.ReaderT (ST); |
//scala | |
vertx.createHttpServer().requestHandler({ req: HttpServerRequest => | |
req.response() | |
.putHeader("Content-Type", "text/html") | |
.end("<html><body><h1>Hello from Vert.x!" + | |
"</h1></body></html>") | |
}).listen(8080) | |
//groovy | |
vertx.createHttpServer().requestHandler({ req -> |
define(function (require) { | |
var Page = require('./base/page') | |
, _ = require('vendor/lodash/lodash.underscore'); | |
function DashboardPage() { | |
Page.apply(this, arguments); | |
} | |
DashboardPage.prototype = Object.create(Page.prototype); |