Skip to content

Instantly share code, notes, and snippets.

View cyberoctopi's full-sized avatar
😣
Tinkering

No Say cyberoctopi

😣
Tinkering
  • No where
View GitHub Profile
(def <== (comp deref re-frame/subscribe))
(defn data-tableau []
"Heads up display for the database. "
(let [data (subscribe [::subs/tableau])]
[:div.data-tableau (pr-str @data)]))
;; what i'd like to do is
(defn data-tableau []
(ns clojureapplied.ch1.validate
(:require [schema.core :as s]))
(s/defrecord Ingredient
[name :-s/Str
quantity :-s/Int
unit :-s/Keyword])
(ns d-c.events
(:require [d-c.db :as db]
[re-frame.core :refer [dispatch reg-event-db reg-event-fx reg-sub]]
[ajax.core :refer [GET POST PUT]]))
;;dispatchers
(reg-event-db
:initialize-db
(fn [_ _]
db/default-db))
(reg-event-fx
:create-user
(fn [_ [_ user]]
{:http {:method POST
:url "/register"
:ajax-map {:params user}}}))
(reg-event-fx
:create-user
(fn [_ [_ user]]
{:http {:method POST
:url "/register"
:ajax-map {:params user}}}))
(def active-page?
(fn [ap]
(keyword-identical? ap (get db/default-db :active-panel))))
(def menu-items [:celestial-panel :universe-panel])
(def menu-list (filter active-page?))
(transduce menu-list conj menu-items)
@cyberoctopi
cyberoctopi / tmux-cheatsheet.markdown
Created March 22, 2017 09:07 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@cyberoctopi
cyberoctopi / cyberpunk2.el
Created November 13, 2013 06:49
Work in progress...
;; Cyberpunk Colour Theme
;;
;; "and he'd still see the matrix in his sleep, bright lattices of logic
;; unfolding across that colorless void..."
;; William Gibson, Neuromancer.
;;
(require 'color-theme)
;;;###autoload