Skip to content

Instantly share code, notes, and snippets.

View sktoiva's full-sized avatar

Sampo Toiva sktoiva

  • Vuono Group Oy
  • Helsinki, Finland
View GitHub Profile
@sktoiva
sktoiva / core.clj
Last active December 6, 2015 19:37
Trim all whitespace
(ns trim-all.core
(:require [clojure.string :as str]))
(defn trim-all [s]
(->> s
(re-seq #"\".*?\"|\S+")
(str/join " ")))
(comment
(trim-all " Foo Baoeuaeuar \" Foo Bar\" aonethu aent saetnh aseonthu \"Fo aoeshd \"")
Spine = require('spine')
class Exercise extends Spine.Model
@configure 'Exercise', 'repetitions', 'sets', 'weight'
@extend @Local
module.exports = Exercise