Skip to content

Instantly share code, notes, and snippets.

View shinseitaro's full-sized avatar
🏠
Working from home

shinseitaro shinseitaro

🏠
Working from home
View GitHub Profile
@shinseitaro
shinseitaro / auth.clj
Last active July 22, 2024 23:55
username and password auth for Biff
(ns com.example.auth
(:require [com.biffweb :as biff]
[buddy.hashers :as hashers]
[xtdb.api :as xt]
[com.example.ui :as ui]
[clojure.string :as s]))
(defn submit-new-auth-user [ctx username password]
(biff/submit-tx ctx
[{:db/doc-type :biff.auth/username
@shinseitaro
shinseitaro / July 18, 2023.md
Last active August 23, 2023 02:36
gistpad-scratch

‎‎​

ClojureによるWeb開発のサーバサイドで注目度の高い(マイクロ)フレームワークとしてDuctがあります。

ちょうど1年前の2017年12月に私自身初めてDuctによる簡単なREST APIを試作してみて、その過程をAdvent Calendar記事にしたことがありました。

今回は主にClojure言語のことを知っていてWebアプリ開発に興味のある方向けに、英語も含めてドキュメントのとても少ないDuctというフレームワークがどのようなものなのか、技術的な詳細に踏み込んだ解説を試みます。

ちなみに、執筆時点で参照/動作確認した各種ライブラリのバージョンは、サンプルプロジェクト"hello-duct"のproject.cljの通りです(Duct最新安定版0.11.2のテンプレートのまま)。

Ductとは

@shinseitaro
shinseitaro / inter-exchange.ipynb
Created September 25, 2022 06:28
inter exchange.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shinseitaro
shinseitaro / Poetry.md
Last active April 19, 2022 00:14
poetry 入門

poetry はじめた

自分の環境

$ cat /etc/os-release 
NAME="Linux Mint"
VERSION="20.3 (Una)"
ID=linuxmint
ID_LIKE=ubuntu
@shinseitaro
shinseitaro / picture-scraper.ipynb
Created March 21, 2022 00:13
picture scraper.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shinseitaro
shinseitaro / insert-or-ignore.ipynb
Created March 12, 2022 01:17
insert or ignore.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shinseitaro
shinseitaro / value-set.ipynb
Created December 27, 2021 20:50
value set.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shinseitaro
shinseitaro / limit_order.ipynb
Created December 24, 2021 05:07
limit_order.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shinseitaro
shinseitaro / crypto-advent-calender-2021.ipynb
Created December 13, 2021 20:27
Crypto Advent Calender 2021.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.