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
# Create build-directory in project and place this package.json in that dir | |
{ | |
"name": "build", | |
"version": "0.0.0", | |
"private": true, | |
"description": "Grunt-cli & Bower", | |
"dependencies": { | |
"grunt-cli": "0.1.11", | |
"bower": "1.2.8" | |
}, |
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 common.util | |
(:require [clojure.string :as str] | |
[uix.compiler.attributes :as attr] | |
[uix.compiler.js :as js])) | |
;; Could also just emit Object.assign, a bit simpler and doesn't need js*. | |
;; Spread operator might be a bit faster in some cases, but depends on | |
;; the browser and many variables probably. | |
;; https://clojurians.slack.com/archives/CNMR41NKB/p1701179422380989 | |
;; We might not want to keep this optimized version in the repo and |
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 dev.linters | |
(:require [cljs.analyzer :as ana] | |
[clojure.string :as str] | |
[uix.linter :as linter]) | |
(:import (cljs.tagged_literals | |
JSValue))) | |
(defn mui-component? [tag] | |
;; TODO: Could check better if it looks like a MUI component | |
(symbol? tag)) |
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 metosin.common.edn | |
#+clj | |
(:require [clj-time.format :as f]) | |
#+cljs | |
(:require [cljs-time.format :as f] | |
cljs.reader) | |
#+clj (:import [org.joda.time DateTime LocalDate])) | |
;; | |
;; #DateTime tagging |
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 app.dev.shadow | |
(:require [shadow.cljs.devtools.api :as shadow] | |
[clojure.edn :as edn])) | |
;; Run this with: | |
;; npx shadow-cljs clj-run app.dev.shadow/watch | |
(set! *warn-on-reflection* true) | |
(defn watch |
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
(def start (atom nil)) | |
(def log (atom [])) | |
(defn latency-test [] | |
(let [a (r/atom 0)] | |
(fn [] | |
(let [[b update-b] (react/useState 0)] | |
(react/useEffect | |
(fn [] |
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
alias: TV valot | |
description: "" | |
trigger: | |
- platform: state | |
entity_id: | |
- media_player.tv | |
not_to: | |
- unknown | |
for: | |
seconds: 5 |
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
var vm = require("vm"); | |
var fs = require("fs"); | |
function nodeGlobalRequire(file) { | |
var _module = global.module, | |
_exports = global.exports, | |
exportedRequire = false; | |
// to circumvent Node.js environment detection in bundled libraries | |
global.module = undefined; |
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 frontend.view.editor | |
(:require [reagent.core :as reagent] | |
[goog.dom :as dom]) | |
(:import [goog.editor Field ContentEditableField Command] | |
[goog.ui.editor DefaultToolbar ToolbarController ToolbarFactory] | |
[goog.editor.plugins BasicTextFormatter RemoveFormatting ListTabHandler | |
SpacesTabHandler EnterHandler HeaderFormatter TableEditor])) | |
(defn editor-view [] | |
(let [field-name (gensym) |
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 foobar.components | |
(:require [com.stuartsierra.component :as component] | |
[compojure.api.sweet :refer :all])) | |
(defmethod compojure.api.meta/restructure-param :components | |
[_ components acc] | |
(update-in acc [:letks] into [components `(::components ~'+compojure-api-request+)])) | |
(defn wrap-components [handler components] | |
(fn [req] |
NewerOlder