Skip to content

Instantly share code, notes, and snippets.

View The-Alchemist's full-sized avatar

The Alchemist The-Alchemist

  • Philadelphia, PA, USA
View GitHub Profile
ssrihari /
Last active July 11, 2024 12:22
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
dustingetz / photon todo demo .cljc
Last active August 15, 2022 21:47
Full stack, multiplayer todo list app in one file
(ns app
"Full stack, multiplayer todo list app in one file"
(:require [datascript.core :as d]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui :as ui])
#?(:cljs (:require-macros app)))
(defonce !conn #?(:clj (d/create-conn {}) :cljs nil))
tkrotoff /
Last active February 27, 2024 15:40
React Native vs Flutter
kjmph / A_UUID_v7_for_Postgres.sql
Last active July 6, 2024 19:07
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 to support microsecond precision as well. Read more here:
-- Based off IETF draft,
create or replace function uuid_generate_v7()
returns uuid
as $$
-- use random v4 uuid as starting point (which has the same variant we need)
-- then overlay timestamp
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string
return encode(
ericnormand / 00 Show
Last active July 6, 2022 15:52
Apropos Clojure - July 28, 2021
komamitsu /
Last active May 28, 2024 23:20
GraalVM shared library example which receives String arguments called from C
package org.komamitsu.foobar;
import org.graalvm.nativeimage.IsolateThread;
import org.graalvm.nativeimage.c.function.CEntryPoint;
import org.graalvm.nativeimage.c.type.CCharPointer;
import org.graalvm.nativeimage.c.type.CTypeConversion;
public class SharedStringMethod
@CEntryPoint(name = "add")
jarek-przygodzki /
Last active July 10, 2023 15:40
How core.longpaths works in Git

I've recently looked into how core.longpaths Git options works and how it's related to Enable Win32 long paths Windows option. Turns out they are not related, and longpaths is both clever and hacky.

Many Windows wide char APIs support longer than MAX_PATH paths through the file namespace prefix (\\?\ or \\?\UNC\) followed by an absolute path. When long paths support is enabled via 'core.longpaths' option, handle_long_path function expands long paths using the '\?' file namespace prefix. See this commit message for detailed explantion.

ckunte /
Last active June 7, 2024 18:44
Brother HL-L2321D as a network-enabled AirPrint printer

Brother HL-L2321D as a network-enabled AirPrint printer

Brother HL-L2321D does one thing and does it well. It's fast, prints duplex, and is lean on cartridge usage. Its drivers are available for MacOS and Windows 10, and so installing it is a breeze. Despite the fact that it has one USB port for interface, making this printer accessible (a) over network and (b) on iOS devices is easy too. This requires setting up a print server. Here's why: The key difference between a non-network and a network printer is that the latter not only features hardware (viz., a network port and / or a wireless chip) but that it also has a print server built-in to the printer itself. These missing features in a non-network printer can easily be outsourced to, say, a Raspberry Pi, which may in fact make this a more capable printer than an off-the-shelf network printer.

Setting up a print server on Raspberry Pi

Connecting it to a Raspberry Pi on your home network to enable sharing requires a little work, but when done, it mak

noelbundick / Dockerfile
Created June 28, 2019 23:23
How to use Docker build secrets
# syntax = docker/dockerfile:1.0-experimental
FROM python:3.7-alpine AS builder
COPY . .
# mount the secret in the correct location, then run pip install
RUN --mount=type=secret,id=pipconfig,dst=/etc/pip.conf \
pip install -r requirements.txt
CREATE OR REPLACE FUNCTION generate_sequential_uuid(p_interval_length int DEFAULT 60)
LANGUAGE plpgsql
AS $$
v_i int;
v_time bigint;
v_bytes int[16] = '{}';
v_hex text[16] = '{}';