Skip to content

Instantly share code, notes, and snippets.

View wavejumper's full-sized avatar
👽

Thomas Crowley wavejumper

👽
View GitHub Profile
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
module slit () {
translate([0,10,0]) { cube([4,30,15], true); }
}
module bolt(height, dia) {
rotate([0,90,0]) {
cylinder(h=height, d=dia, center=true);
}
}
(ns static.core-test
(:require [clojure.test :refer :all]
[static.core :as s]))
(defmacro with-env [eval-sym & body]
`(let [env# (s/create-env)
~eval-sym (partial s/-eval env#)]
~@body))
(deftest scoping
[(['if cond truthy-expr] :seq)]
(do (lint! (lint/refactor expr `(when ~cond ~truthy-expr)))
(eval-expr `(if ~cond ~truthy-expr nil)))
{:seat-tube {:length 560
:angle 73}
:top-tube {:length 580}
:head-tube {:length 220
:angle 73}
:chainstay {:length 435}
:bottom-bracket {:drop 65}
:fork {:length 396
:rake 70}}

React Native + macOS + Clojurescript

image

Project Catalyst

Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.

This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).

@wavejumper
wavejumper / sente-ring-jetty9-adapter-example.clj
Last active August 9, 2021 09:20 — forked from ptaoussanis/sente-ring-jetty9-adapter-example.clj
Example of how to use Sente and Jetty 9 via `ring-jetty9-adapter`
;; Example courtesy of @wavejumper
(ns sente-ring-jetty9-adapter-example
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :as ring.defaults :refer [wrap-defaults]]
[ring.middleware.session.memory :as mem]
[ring.adapter.jetty9 :as jetty]
[taoensso.sente :as sente]
[taoensso.sente.server-adapters.jetty9 :as adapters.jetty9]))
@wavejumper
wavejumper / README.md
Last active September 26, 2020 11:27
(require '[sandbox.reagent :refer [render]])
(defn my-component []
[:div {} "Hello from GitHub"])
(render [my-component])