Skip to content

Instantly share code, notes, and snippets.

(use ./build/jaylib)
(set-config-flags
:msaa-4x-hint)
(init-window 800 600 "Chart")
(init-audio-device)
(set-target-fps 60)
(def current-animations @{})
@borkdude
borkdude / assoc_pairs.clj
Last active April 6, 2021 11:38
Reports number of used k/v pairs in assoc to gather data for https://clojure.atlassian.net/browse/CLJ-1656
#!/usr/bin/env bash
#_" -*- mode: clojure; -*-"
#_(
"exec" "clojure" "-Sdeps" "{:deps {borkdude/grasp {:git/url \"https://github.com/borkdude/grasp\" :sha \"6315cea8c0b6dafc7b1eef9ccd03d6d5590d2045\"}}}" "-M" "$0" "$@"
)
(require '[clojure.java.io :as io]
'[clojure.spec.alpha :as s]
'[clojure.string :as str]
'[grasp.api :as g])
@mgarratt
mgarratt / conjure.md
Last active November 6, 2024 21:03
Conjure Clojure Cheatsheet

nREPL

Binding Action
<localleader>cd Disconnect from the current nREPL server.
<localleader>cf Connect to a server using the port found in any of the files specified by clojure.nrepl/connection.port-files.
<localleader>sc Clone the current nREPL session.
<localleader>sf Create a fresh session from scratch.
<localleader>sq Close the current session.
<localleader>sQ Close all sessions.
\sl List all sessions.
@borkdude
borkdude / script.clj
Last active October 29, 2020 02:23
Spec grep: find usages or reify in clojure.core with two or more interfaces. This idea has been implemented in a library now: https://github.com/borkdude/grasp
;; see https://github.com/borkdude/grasp for a more elaborate implementation
(ns script
(:require [clojure.java.io :as io]
[clojure.pprint :refer [pprint]]
[edamame.core :as e]))
(def clojure-core (slurp (io/resource "clojure/core.clj")))
(def parsed (e/parse-string-all clojure-core
{:all true :auto-resolve '{:current clojure.core}}))
@giner
giner / fix_ibus-mozc.sh
Last active October 27, 2024 13:16
JAPANESE: Make ibus-mozc remember last used mode
# Make ibus-mozc remember the last used mode (e.g. hiragana) and not switch back to Alphabet on restart
# See https://github.com/google/mozc/issues/381
cd $(mktemp -d)
apt source ibus-mozc
cd mozc-*/
patch src/unix/ibus/property_handler.cc << 'EOF'
--- src/unix/ibus/property_handler.cc.orig 2020-10-28 17:21:18.000849932 +0900
+++ src/unix/ibus/property_handler.cc 2020-10-28 17:21:34.172696046 +0900
@@ -80,7 +80,7 @@
@borkdude
borkdude / PR welcome.md
Last active February 2, 2021 21:54
PR welcome

Issues that welcome community contributions are labeled with PR welcome. That doesn't mean I don't welcome contributions for other issues. Feel free to reach out and discuss on Clojurians Slack or Github if you need assistance. Please note that I do not have the time or resources to give free and unlimited Clojure mentoring.

See issues

See issues

@natowi
natowi / audio2midi.md
Last active November 24, 2024 02:45
List of open source audio to midi packages
@yogthos
yogthos / clojure-beginner.md
Last active November 19, 2024 00:26
Clojure beginner resources

Introductory resources

@bakpakin
bakpakin / utf8.janet
Last active January 19, 2022 11:34
Use pegs to parse utf8
###
### utf8.janet
###
### Pure janet utf8 utils. You should probably just use C.
###
(defn utf8-encode
"Convert a sequence of codepoints to a string."
[x]
(def buf @"")
@zeux
zeux / luau_features.pdf
Last active May 22, 2024 23:40
Frequently asked questions about the Lua VM work we (Roblox) are doing.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.