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
var express = require('express') | |
, restaurant = require('./routes/restaurant') | |
, http = require('http') | |
, config = require('./config') | |
, stylus = require('stylus'); | |
var app = express(); | |
require('./db'); |
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
# This file IS NOT part of DocBook V5.0 | |
# | |
# ====================================================================== | |
namespace rng = "http://relaxng.org/ns/structure/1.0" | |
namespace s = "http://purl.oclc.org/dsdl/schematron" | |
namespace db = "http://docbook.org/ns/docbook" | |
default namespace = "http://docbook.org/ns/docbook" | |
include "../../schemas/docbook/docbook.rnc" { |
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
#!/usr/bin/env jjs | |
/*#################################################################################################################################### | |
# As Nashorn does not have http capabilities through XMLHttpRequest (DOM API), we have to use regular Java classes instead. | |
# This sample shows how this can be acheived without depending on any third party libraries. Just a standard Java 8 JDK. | |
# Make sure to have JAVA_HOME/bin on your PATH for the shebang to work. Then just chmod +x away and run... | |
# Alternatively if you're on a non *nix OS, start with jjs -scritping httpsample.js | |
####################################################################################################################################*/ | |
var url = "https://api.github.com/users/billybong/repos"; | |
var response; |
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 store = createStore((state = { counter: 0 }, action) => { | |
switch(action.type) { | |
case "INCREMENT": | |
return { counter: state.counter + 1 } | |
case "DECREMENT": | |
return { counter: state.counter - 1 } | |
default: | |
return state | |
} | |
}) |