Skip to content

Instantly share code, notes, and snippets.

View jwulf's full-sized avatar
:octocat:
Coding on Halmak

Josh Wulf jwulf

:octocat:
Coding on Halmak
View GitHub Profile
@jwulf
jwulf / redux-light-example.js
Created August 21, 2017 13:35 — forked from vasanthk/redux-light-example.js
redux in 14 lines of code
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
}
})
#!/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;
@jwulf
jwulf / rdfalite.rnc
Created February 15, 2013 00:37 — forked from docbook/rdfalite.rnc
# 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" {
@jwulf
jwulf / app.js
Created October 18, 2012 01:46
just some mongoose node code asking for help
var express = require('express')
, restaurant = require('./routes/restaurant')
, http = require('http')
, config = require('./config')
, stylus = require('stylus');
var app = express();
require('./db');