Skip to content

Instantly share code, notes, and snippets.

@chr15m
chr15m / aider-convention-scraper
Last active September 23, 2025 11:49
Convert documentation URLs to Markdown "convention" files to be used by aider and other LLMs
#!/bin/sh
# Scrapes documentation from a URL and converts it to Markdown suitable for aider convention files
# to provide context to the LLM.
if [ $# -eq 0 ]; then
echo "Usage: $(basename "$0") <URL> [URL...]"
echo
echo "Generate aider 'convention' Markdown context from documentation URLs."
echo "suitable for providing LLM context about a project's conventions and style."
@spacegangster
spacegangster / typography.clj
Created January 28, 2021 10:32
Simple Clojure typography transformations for English, French, and Russian typography styles.
(ns common.typography
"Improve quotes and make whitespace non-breaking after 1-2 letter words"
(:require [clojure.string :as str]))
(def typo-replace-starting-nbsp
[#"(^[a-zA-Z\u0400-\u0500]{1,2})\ ", "$1&nbsp;"])
(assert (= "A&nbsp;being in Australia <a class='yoy'>"
(apply str/replace "A being in Australia <a class='yoy'>" typo-replace-starting-nbsp)))
@darkleaf
darkleaf / question.md
Last active April 15, 2023 08:34
Algebraic effects для Clojure.

Привет!

Ключевые слова: coroutine, continuation, generators, async/await, project loom, free monad, algebraic effects.

Я хочу сделать алгебраические эффекты для Clojure(Script). Я уже сделал библиотеку https://github.com/darkleaf/effect/blob/doc-2/README.md Но есть моменты, которые вызывают у меня вопросы.

Если очень кратко, то лично мне эффекты нужны, чтобы:

  1. удобно тестировать бизнес логику
@noahcoad
noahcoad / readme.md
Last active April 21, 2025 07:36
Code Minecraft with Python on Mac OSX

Code Minecraft with Python on Mac OSX

Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX

@igogrek
igogrek / Vue code style.md
Last active May 29, 2024 01:58
Code style and application structure

Application structure

General

  1. Application has tree structure with folders for each "feature"
  2. Feature folders are named with lowerCamelCase → myComponentDashboard
  3. Feature can contain any number of components and nested features
  4. Components are named using UpperCamelCase → MyWidgetComponent.vue
  5. Component can have translation .yml file named correspondingly → MyWidgetComponent.yml
  6. If component requires more than 2 files: .vue and .yml file - folder is created with the same name → MyWidgetComponent
@krisleech
krisleech / jxmls.clj
Last active December 14, 2018 07:54
JXLS in Clojure
:dependencies [[org.clojure/clojure "1.8.0"]
[org.jxls/jxls "2.4.2"]
[org.jxls/jxls-poi "1.0.13" :exclusions [org.jxls/jxls]]])
(import [org.jxls.util JxlsHelper])
(import [org.jxls.common Context])
(require '(clojure.java [io :as io]))
;; http://jxls.sourceforge.net/xls/object_collection_template.xls
@ponzao
ponzao / vice.clj
Created September 26, 2016 16:35
Clojure Spec coercion nonsense
(ns vice
(:require [clojure.spec :as s]
[clj-time.core :as t]
[clj-time.format :as tf])
(:import [org.joda.time DateMidnight DateTime]
[java.util UUID]
[clojure.lang Keyword]
[java.math BigInteger]
[java.net URL URI]
[java.util.regex Pattern]))
@borkdude
borkdude / specfn.clj
Last active January 7, 2022 13:34
Use a spec for defining function arguments and get validation automatically
(ns specfn.core
(:require [clojure.spec :as s]
[clojure.spec.test :as t]))
(defn- spec-symbols [s]
(->> s
(drop 1)
(partition-all 2)
(map first)
(map name)
@verma
verma / Datascript101-Chapter2.clj
Created May 6, 2016 17:07
Datascript101 - Chapter 2
(ns dt.core
(:require [datascript.core :as d]))
;; schema so nice
(def schema {:maker/email {:db/unique :db.unique/identity}
:car/model {:db/unique :db.unique/identity}
:car/maker {:db/type :db.type/ref}
:car/colors {:db/cardinality :db.cardinality/many}})
@jasongilman
jasongilman / atom_clojure_setup.md
Last active May 11, 2024 02:25
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.