Skip to content

Instantly share code, notes, and snippets.

View luposlip's full-sized avatar
💭
functional

Henrik Mohr luposlip

💭
functional
View GitHub Profile
@sebastibe
sebastibe / vec-utils.cljs
Last active November 12, 2020 14:49
Some helpers when moving elements around in Clojure vectors
(defn vec-remove
"Remove elem in coll by index."
[coll pos]
(vec (concat (subvec coll 0 pos) (subvec coll (inc pos)))))
(defn vec-add
"Add elem in coll by index."
[coll pos el]
(concat (subvec coll 0 pos) [el] (subvec coll pos)))
@pesterhazy
pesterhazy / es6-class-react.cljs
Last active August 17, 2018 13:14
React component in pure cljs using ES6 class inheritance
;; implementing a React component in pure cljs, no reagent necessary
;; using goog.object.extend to create a ES6 class that inherits from
;; React.Component
;; credit to @thheller
(defn MyReact [props context updater]
(this-as this
(js/React.Component.call this props context updater)))

The Tech

We're building Style.com to be the most sophisticated ecommerce platform in the world. We use the latest technology, not just because it's fun (although it is!), but because the best tools help us put together the best team and deliver a great experience for our customers worldwide.

Here's a taste of the tech you'll be working with:

  • Single-page frontend applications based on a ClojureScript/Reagent/React stack
  • Neural net-driven recommendation and search systems in Clojure
  • Automatic curation tools using tag hierarchies in Datomic
  • Containerised deployments on AWS/Docker/Kubernetes
@jasongilman
jasongilman / atom_clojure_setup.md
Last active May 11, 2024 02:25
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing
@swannodette
swannodette / gist:3217582
Created July 31, 2012 14:52
sudoku_compact.clj
;; based on core.logic 0.8-alpha2 or core.logic master branch
(ns sudoku
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defn get-square [rows x y]
(for [x (range x (+ x 3))
y (range y (+ y 3))]
(get-in rows [x y])))
@stuarthalloway
stuarthalloway / gist:2645453
Created May 9, 2012 15:22
Datomic queries against Clojure collections
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
42)
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
@mojavelinux
mojavelinux / Writing Tools Writeup.markdown
Created January 30, 2012 18:56 — forked from matthewmccullough/Writing Tools Writeup.md
How To Write A Technical Book (One Man's Modest Suggestions)
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 20, 2024 13:01 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.