Skip to content

Instantly share code, notes, and snippets.

View mitchelkuijpers's full-sized avatar

Mitchel Kuijpers mitchelkuijpers

View GitHub Profile
### Keybase proof
I hereby claim:
* I am mitchelkuijpers on github.
* I am mitkuijp (https://keybase.io/mitkuijp) on keybase.
* I have a public key ASAPHj9kRoA5KZxOzzJp-MmfojiFDwh01luzCUUBvXeOZAo
To claim this, I am signing this object:
(defn safe-keyword [str]
(if (.contains str " ") str (keyword str)))
(cheshire.core/parse-string "{\"with space\": \"blue\"}" safe-keyword)
@mitchelkuijpers
mitchelkuijpers / index.js
Last active August 29, 2015 14:13
requirebin sketch
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
var Delegator = require('dom-delegator');
var Backbone = require('backbone');
var Counter = Backbone.Model.extend({});
window.counter = new Counter;
counter.set('value', 'change me');
(let [servlet (new CamelHttpTransportServlet)
server (web/run servlet :port 8081 :path "/iu")]
(assoc component :servlet servlet :server server)))
var gulp = require('gulp');
var browserify = require('browserify');
var notify = require('gulp-notify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var plumber = require('gulp-plumber');
var less = require('gulp-less');
var csso = require('gulp-csso');
var watch = require('gulp-watch');
var envify = require('envify');
gulp.task('scripts', function() {
return scripts(false);
});
gulp.task('watchScripts', function() {
return scripts(true);
});
function scripts(watch) {
var bundler, rebundle;
bundler = browserify('./src/client.js', {
basedir: __dirname,
debug: !production,
cache: {}, // required for watchify
packageCache: {}, // required for watchify
fullPaths: watch // required to be true only for watchify
});
if(watch) {
gulp.task('watchScripts', function() {
gulp.watch('src/**/*.js', ['scripts']);
});
var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var reactify = require('reactify');
var production = process.env.NODE_ENV === 'production';
gulp.task('scripts', function () {
var bundler = browserify('./src/client.js', {basedir: __dirname, debug: !production}});
bundler.transform(reactify);
var gulp = require('gulp');
var browserify = require('browserify');
var notify = require('gulp-notify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var plumber = require('gulp-plumber');
var less = require('gulp-less');
var csso = require('gulp-csso');
var watch = require('gulp-watch');
var envify = require('envify');