This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; dracula-theme.el --- Dracula Theme | |
;; Copyright 2015-present, All rights reserved | |
;; | |
;; Code licensed under the MIT license | |
;; Author: film42 | |
;; Version: 1.3.2 | |
;; Package-Version: 20180416.652 | |
;; Package-Requires: ((emacs "24")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; The latest CIDER v0.18-SNAPSHOT bumped the nREPL dependency to 0.4 | |
;; which broke the sayid and clj-refactor nREPL middleware. | |
;; Here's how to disable them until they can be updated | |
(defun dotspacemacs/user-config () | |
;; ... | |
(setq sayid-inject-dependencies-at-jack-in nil) | |
(setq cljr-inject-dependencies-at-jack-in nil) | |
;; ... | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn project-paths [projection] | |
(loop [pr projection | |
paths '[]] | |
(let [[el next] pr] | |
(if (empty? pr) | |
paths | |
(if (vector? next) | |
(recur | |
(drop 2 pr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns lilactown.promise) | |
;; This is a simple macro to aid with dealing with promise chains | |
;; in ClojureScript. Often external JS libraries (such as request-promise | |
;; or other async libs) return a promise object, so we write code like: | |
;; | |
;; (-> promise-value | |
;; (.then do-something) | |
;; (.then #(do-something-else %)) | |
;; (.then (fn [val] (and-again val))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Problem 1: As a library developer, I want to be able to test my hooks without having to render a component. | |
Problem 2: As a library developer, I want to be able to publish my hooks without a direct dependency on React. | |
Problem 3: As an application developer, I want to be able to easily override (with some sort of proxy/rewire magic, | |
perhaps) hooks with side effects in tests. | |
Problem 4: As an application developer, I would like to be able to use hooks written for React in other frameworks | |
that support hooks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns my-app.css | |
(:require ["emotion" :as emotion])) | |
(defn edn [& styles] | |
(apply emotion/css (map clj->js styles)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install rustup from https://rustup.rs/ | |
rustup toolchain add nightly # install nightly | |
cargo +nightly install racer # install racer | |
rustup component add rustfmt-preview # install rustfmt | |
rustup component add rust-src # install rust source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit "6ccb629e365f46a9516e4defeced652cce9d4d35" | |
shadow-cljs - config: /Users/will/Code/clojure/hx/shadow-cljs.edn cli version: 2.7.9 node: v10.3.0 | |
shadow-cljs - socket connect failed, server process dead? | |
shadow-cljs - starting via "clojure" | |
Dec 14, 2018 5:17:21 PM org.xnio.Xnio <clinit> | |
INFO: XNIO version 3.3.8.Final | |
Dec 14, 2018 5:17:21 PM org.xnio.nio.NioXnio <clinit> | |
INFO: XNIO NIO Implementation Version 3.3.8.Final | |
shadow-cljs - HTTP server for :workshop available at http://localhost:8700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/zsh | |
brew tap railwaycat/emacsmacport | |
brew install emacs-mac --with-xml2 --with-ctags --with-spacemacs-icon --with-gnutls --with-natural-title-bar | |
osascript -e 'tell application "Finder" to make alias file to POSIX file "/usr/local/opt/emacs-mac/Emacs.app" at POSIX file "/Applications"' | |
# For opening from term: https://gist.github.com/railwaycat/4043945 | |
# Install spacemacs | |
git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns apollo-example.core | |
(:require [hx.react :as hx :refer [defnc]] | |
["react-dom" :as rdom] | |
["react-apollo" :as apollo] | |
["apollo-boost" :default ApolloClient :refer [gql]] | |
[applied-science.js-interop :as j])) | |
(def client (ApolloClient. #js {:uri "https://48p1r2roz4.sse.codesandbox.io"})) | |
(def exchange-query (gql "{ |