Gemini CLI に Gemini CLI 自体のソースコードを読ませつつ、高度な使い方を分析させたもの
Gemini CLIは、単なる対話ツールではありません。その設計の核心を理解することで、私たちはGemini CLIを、自らの開発ワークフローに最適化された、強力な自動化エンジンへと変貌させることができます。このガイドでは、基本的な使い方から、コードリーディングによって明らかになった高度な実践テクニックまでを解説します。
(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]] |
Overview of recent projects and how they relate:
clj-kondo: Clojure linter, compiled with GraalVM for fast startup. While implementing clj-kondo I realized that analyzed code could not only be linted, but also interpreted. This gave rise to sci.
jet: converts between JSON, EDN and Transit. Supports minimal query language in the spirit of jq. While implementing the query language for jet, I realized that using normal Clojure instead of a DSL was better for most Clojure users. This gave rise to sci.
edamame: EDN parser with location metadata and configurable dispatch table. This way of parsing is inspired by rewrite-clj, but it skips the intermediate node representation. This parser was extracted from sci.
"Access-Control-Allow-Origin"ヘッダが返らないリソースへのアクセス結果が、ユーザースクリプトマネージャによって異なることを検証するためのユーザースクリプト。
テスト方法
ClojureScript master now has cljs.core/eval
. This delegates to cljs.core/*eval*
which, by default throws, but you can bind it to any implementation that can compile and evaluate ClojureScript forms.
If you require the cljs.js
namespace (which is the main support namespace for self-hosted ClojureScript), then cljs.core/*eval*
is set to an implementation that uses self-hosted ClojureScript for this capability. This means that all self-hosted ClojureScript environments will now have a first-class eval
implementation that just works. For example, Planck master:
$ planck -q
cljs.user=> (eval '(+ 2 3))
5
#!/bin/bash | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=5.0.0 |
(defn classes-of | |
"Get the classes of an element as a Clojure keyword vector." | |
[e] | |
(let [words (-> e (.getAttribute "class") (string/split " "))] | |
(mapv keyword words))) | |
(defn classes->str | |
"Change a Clojure keyword seq into an HTML class string." | |
[classes] | |
(->> classes (mapv name) (string/join " "))) |
(ns cljsjs.jwt | |
(:require | |
[clojure.spec :as s] | |
[clojure.string :as str] | |
[goog.json :as json] | |
[goog.crypt.base64 :refer [encodeString decodeString]])) | |
;; https://github.com/Caligatio/jsSHA | |
;; goog.crypt.hmac produces different signature than nodejs version | |
(def jssha (js/require "jssha")) |