Skip to content

Instantly share code, notes, and snippets.

View bobbicodes's full-sized avatar
💭
Moved to bobbicodes on Codeberg

Bobbi Towers bobbicodes

💭
Moved to bobbicodes on Codeberg
View GitHub Profile
@yogthos
yogthos / clojure-beginner.md
Last active April 18, 2025 02:43
Clojure beginner resources

Introductory resources

@sbinlondon
sbinlondon / synthwaveglow.md
Last active October 12, 2024 17:10
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

Loading :advanced Code into an Unmodified WROVER running Espruino

You can load ClojureScript :advanced code directly into an ESP32 WROVER running Espruino for execution upon boot, by creating a binary and flashing it to the JavaScript "boot ROM" area. This has the same effect as when loading code via the Espruino Web IDE, in the "Direct to Flash (execute code at boot)" mode, but flashing is much quicker and more reliable.

Note: To do this, you'll need an ESP32 WROVER with SPI PSRAM, as opposed to just a WROOM, as the ClojureScript in this example uses more RAM than is available in the WROOM.

Create :advanced Code

Here is a small program that uses enough to pull in data structures, etc, leading to nearly 100 KiB:

@ericnormand
ericnormand / 00_script.clj
Last active April 23, 2025 16:46
Boilerplate for running Clojure as a shebang script
#!/bin/sh
#_(
#_DEPS is same format as deps.edn. Multiline is okay.
DEPS='
{:deps {clj-time {:mvn/version "0.14.2"}}}
'
#_You can put other options here
OPTS='
(ns advent-2018.day-02
(:require
#?(:cljs [planck.core :refer [line-seq read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[advent-2018.day-01 :as day-01])
(:import (java.util.concurrent Executors ExecutorService)))
(def input (->> "advent_2018/day_02/input" io/resource io/reader line-seq))
(defn count-with-exact [box-ids n]
@stathissideris
stathissideris / solver.clj
Created August 19, 2018 23:11
Sudoku solver clojure
(ns sat.core
(:require [rolling-stones.core :as sat :refer [!]]
[clojure.string :as str]))
(def rows 9)
(def cols 9)
(def values 9)
(defn possible-square-values
@bmaddy
bmaddy / README.md
Last active May 24, 2019 03:45
"the most beautiful program ever written" as described here https://www.youtube.com/watch?v=OyfBQmvr2Hc in clojure
@bhb
bhb / README.md
Last active May 15, 2023 01:28
Clojure friendly mode, inspired by https://github.com/slipset/friendly
@athos
athos / deps.edn
Last active June 2, 2024 08:57
Try on your terminal `clojure -Sdeps '{:deps {hello-clojure/hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :git/sha "099bdf7d565b2c35c1df601abf58514cc5276237"}}}' -M -m hello-clojure`
{:paths ["."]
:deps {clansi/clansi {:mvn/version "1.0.0"}}}
@RSNara
RSNara / raf-loop.cljs
Created September 1, 2017 16:35
A requestAnimationFrame loop that's useful as a game loop.
(defn raf-loop [func]
(let [stop (atom false)
id (atom nil)]
(reset! id (.requestAnimationFrame js/window
(fn helper [& args]
(when-not @stop
(reset! id (.requestAnimationFrame js/window helper))
(try
(apply func args)
(catch js/Error ex