Skip to content

Instantly share code, notes, and snippets.

(defn login []
(let [[email set-email] (use-state "")
[password set-password] (use-state "")
[mutate {:keys [loading error]}] (use-mutation {:variables {:email email :password password}})
email-valid? (check-email email)]
(use-event :keypress #(when (and (= 13 (:keyCode %)) password email-valid) (mutate)))
($ mui/Box {:margin "10vh auto"
:maxWidth "40ex"}
($ "form"
($ mui/TextField {:label "Электронная почта"
@esseswann
esseswann / core.cljs
Last active October 11, 2020 15:28
react-cljs no libs
(ns reactik.core
(:require-macros [reactik.util :refer [defc]])
(:require [cljs-bean.core :refer [->clj]]
["@material-ui/core" :as mui]
["react-dom" :as react-dom]
[reactik.react :as react :refer [$]]))
(defn onChange [handler]
(fn [event]
@esseswann
esseswann / gist:1d5a39bdedc75e500e0fd7894c330752
Created January 12, 2020 17:55
If only I had time to implement it
libs
main
functionOne
functionTwo
genericName
subFunction
variable
variable
components
#!/bin/bash
if [ "$(id -u)" -ne "0" ]; then
echo "This script requires root."
exit 1
fi
set -xe
apt-get install mesa-utils glmark2-es2 glmark2-es2-drm