- alpine 3.17.1, 3.18, 3.19 and edge x86-64
- multiple linux kernels worked 6.1.8-lts w/zfs and 6.6.8-lts
- edge, testing apk repos enabled
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
Homebrew makes it easy to install and keep installed software up to date on your Mac - as part of my backup routine for my Mac I want to be able to run a single command to reinstall all packages.
If you're searching on how to backup & restore Homebrew, then I assume you're here for the commands.
Brewfiles are files generated with definitions that Homebrew reads and processes, a generated
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
RUN apk --no-cache add \ | |
wget \ | |
ca-certificates \ | |
libstdc++ | |
# Get and install glibc for alpine | |
ARG APK_GLIBC_VERSION=2.29-r0 | |
ARG APK_GLIBC_FILE="glibc-${APK_GLIBC_VERSION}.apk" | |
ARG APK_GLIBC_BIN_FILE="glibc-bin-${APK_GLIBC_VERSION}.apk" | |
ARG APK_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${APK_GLIBC_VERSION}" | |
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ |
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {
import { useLayoutEffect, useCallback, useState } from 'react' | |
export const useRect = (ref) => { | |
const [rect, setRect] = useState(getRect(ref ? ref.current : null)) | |
const handleResize = useCallback(() => { | |
if (!ref.current) { | |
return | |
} |