HTML to export - includes Paged.js polyfill:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
</head>
HTML to export - includes Paged.js polyfill:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
</head>
Run the app:
clj -M -m htmx
// Afficher les boites de liens à gauche | |
settings.hintAlign = "left"; | |
// Se déplacer avec <C-j> et <C-k> dans Omnibox | |
cmap('<Ctrl-j>', '<Tab>'); | |
cmap('<Ctrl-k>', '<Shift-Tab>'); | |
// Différentes règles afin de retrouver quelques comportements de base de Vimium | |
map('u', 'e'); | |
mapkey('p', "Open the clipboard's URL in the current tab", function() { |
(ns authexample.web | |
(:gen-class) | |
(:require [buddy.auth :refer [authenticated? throw-unauthorized]] | |
[buddy.auth.backends.session :refer [session-backend]] | |
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]] | |
[clojure.java.io :as io] | |
[compojure.response :refer [render]] | |
[reitit.ring :as ring] | |
[ring.adapter.jetty :as jetty] | |
[ring.middleware.params :refer [wrap-params]] |
#!/usr/bin/env bb | |
(require '[babashka.curl :as curl] | |
'[clojure.java.shell :as shell] | |
'[clojure.string :as str]) | |
(def url "http://speedtest-ams2.digitalocean.com/") | |
(def get-endpoints | |
(let [{:keys [body]} (curl/get url)] |
(ns simple.core | |
(:require [reagent.dom :as reagent] | |
[re-frame.core :as rf])) | |
;; -- Domino 1 - Event Dispatch ----------------------------------------------- | |
(defn dispatch-click | |
[] | |
(rf/dispatch [:click-count])) ;; send event `:click-count` |
(ns color-sorting.core | |
(:require [reagent.core :as reagent] | |
[reagent.dom :as dom])) | |
(def colors ["blue" "yellow" "green" "purple" "red"]) | |
(def color-row (reagent/atom ["blue" "yellow" "green"])) | |
(def sorted-color-row (reagent.ratom/reaction (sort @color-row))) | |
(defn square [color] |
(ns simple.core | |
(:require [reagent.dom :as dom] | |
[re-frame.core :as rf] | |
[clojure.string :as str])) | |
;; A detailed walk-through of this source code is provied in the docs: | |
;; https://github.com/Day8/re-frame/blob/master/docs/CodeWalkthrough.md | |
;; -- Domino 1 - Event Dispatch ----------------------------------------------- |
(ns instructions.core | |
(:require [reagent.dom :as dom] | |
[re-frame.core :as re-frame])) | |
(defn info [] | |
[:div {:style {:max-width 500}} | |
[:h1 "re-playground"] | |
[:p "code is livereloaded. | |
this right-hand panel has the id 'app'. | |
to render reagent into this panel, target this element with " |
Convert Cojure code from this article "Creating a TODO cli with Clojure" to use with Babashka: https://dev.to/prasannagnanaraj/i-just-created-a-todo-cli-with-clojure-1133