Skip to content

Instantly share code, notes, and snippets.

View respatialized's full-sized avatar
📶
stabilizing

respatialized

📶
stabilizing
View GitHub Profile
@paulkoegel
paulkoegel / garden-cheat-sheet.clj
Last active February 20, 2022 21:09
Garden (CSS in Clojure) Cheat Sheet
;; https://github.com/noprompt/garden
[:h1 {:color "green"}]
;; multiple selectors
[:h2 :h3 {:color "orange"}]
;; => h1, h2 { color: orange; }
;; descendants
[:h1 [:a {:text-decoration "none"}]]
@kachayev
kachayev / aleph-planning.md
Last active December 12, 2022 16:28
A few thoughts on Aleph development

Aleph, Async, HTTP, Clojure

I've been working with Aleph rougly for last 5 years, actively contributing to the library for last 2 (or so). I also put some effort into spreading the word about it, including educational tech talks, like "Deep HTTP Dive Throught Aleph & Netty". But the more I talk to people the more confusion I find, mostly about how Aleph works and what can you expect when adding it to your stack. Clojurists Together has recently announced Aleph to get Q1 funding, I think it's a good time to share my priorities and thoughts on development plans that were mentioned in the blog post. Hope the community would find it interesting and helpful.

Aleph describes itself as "asynchronous communication for Clojure" library. And you should probably pay a good portion of your attention to the first word: "asynchronous".

@shaunlebron
shaunlebron / realtalk.md
Last active December 18, 2024 02:12
why Dynamicland Realtalk isn't open source

Transcribed from an interview with Toby Schachman and Paula Te on The Afrofuturist Podcast:

There's this notion of the open-source movement. There are a lot of things
that we totally resonate with that because it's about understanding how your
technology works. We're totally 100% on board with that.

But then there are other issues with the open-source community, where it's
very internet-based and so open-source ends up benefitting this group of
people who have really strong access to internet and understand how to use
;;; wpgtk-theme.el --- Dynamic color theme, specially made for wpgtk
;; based on: <https://github.com/warreq/xres-theme>
;;
;; Version: 0.1
;; Keywords: color, theme
;; Package-Requires: ((emacs "24"))
;; Initially with the help of emacs-theme-generator, <https://github.com/mswift42/theme-creator>.
;; Modified directly from Nasser Alshammari's spacemacs theme
@danielcompton
danielcompton / ext.clj
Last active July 5, 2021 15:53
Extended attributes in Clojure
(defn supports-extended-attributes?
"Not all filesystems suport Java's UserDefinedFileAttributes (a.k.a. extended attributes),
notably HFS+ and APFS on macOS.
Waiting for https://bugs.openjdk.java.net/browse/JDK-8030048 to add macOS support."
[^Path path]
(.supportsFileAttributeView
(Files/getFileStore path)
^Class UserDefinedFileAttributeView))
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active April 30, 2025 20:56
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

How Clojure's documentation can leapfrog other languages

Summary

I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.

The Problem

Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."

Generating Flame Graphs for Apache Spark

Flame graphs are a nifty debugging tool to determine where CPU time is being spent. Using the Java Flight recorder, you can do this for Java processes without adding significant runtime overhead.

When are flame graphs useful?

Shivaram Venkataraman and I have found these flame recordings to be useful for diagnosing coarse-grained performance problems. We started using them at the suggestion of Josh Rosen, who quickly made one for the Spark scheduler when we were talking to him about why the scheduler caps out at a throughput of a few thousand tasks per second. Josh generated a graph similar to the one below, which illustrates that a significant amount of time is spent in serialization (if you click in the top right hand corner and search for "serialize", you can see that 78.6% of the sampled CPU time was spent in serialization). We used this insight to spee

@borkdude
borkdude / cljrepl.scala
Last active October 2, 2024 13:28
Clojure REPL inside Scala program
~/dev/scala/cljrepl $ cat build.sbt
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"org.clojure" % "clojure" % "1.8.0"
)
~/dev/scala/cljrepl $ cat src/main/scala/foo.scala
import clojure.java.api.Clojure
import clojure.java.api.Clojure.{`var` => cvar}
@andersjohansson
andersjohansson / helm-org-clock-select-task.el
Created June 11, 2015 12:14
org-clock-select-task with helm
(advice-add 'org-clock-select-task :override #'aj/helm-org-clock-select-task)
(defun aj/helm-org-clock-select-task (&optional prompt)
"Select a task that was recently associated with clocking."
(interactive)
;; TODO sources for these
;; (when (marker-buffer org-clock-default-task)
;; (insert (org-add-props "Default Task\n" nil 'face 'bold))
;; (setq s (org-clock-insert-selection-line ?d org-clock-default-task))