Skip to content

Instantly share code, notes, and snippets.

View iomonad's full-sized avatar
🍋
λ

iomonad iomonad

🍋
λ
  • Lutetia Parisiorum
View GitHub Profile
Iterate over disk pack in binding order looking for any disk not within true-jiggle range of *any* gate (a disk that is between gates)
if found:
all previous disks have true-jiggle centered on the gate they were aligned with
this disk has no jiggle
all subsequent disks have full-jiggle (can be moved from 0 up to 5)
return binder found
else:
all disks are in *a* gate. iterate again searching for a disk within true-jiggle of a false gate
if found:
this disk has false-jiggle
@adi-g15
adi-g15 / arduino-cli-nodemcu.md
Created November 30, 2022 11:09
Using arduino / arduino-cli with NodeMCU (esp8266)

After a lot of searching over the network, this is what I have ended up with. This is intentionally made such that even a absolute beginner is able to follow, so uses fixed paths.

Note: I am not using the --additional-urls flag since it didn't work for me back then, you may try it.

Step 0

First ensure that your PC is detecting the NodeMCU atleast.

arduino-cli board list

How to make a small tweak to free software

The target audience for this is people who are beginners at software engineering and using linux. A lot of the information here may be obvious or already known to you. The language involved is C but you do not need to know any C to read this tutorial. I used mg to write this blog post. I used vs code to edit the source code.

This post is also available on gopher://tilde.team:70/0/~river/tweak-free-software

If you use a piece of free software and it's 99% perfect but there's just this one thing it does that annoys the hell out of you.. you can in theory just fix it! Here's a look at what doing that is like. Hopefully it inspires you, or you pick up a could tricks on the way!

Step 0: Have a problem

@p4ulcristian
p4ulcristian / gist:95aa7b28e3568a1d3e45d27807859baf
Created May 19, 2021 18:12
@dnd-kit/sortable with drag overlay (clojurescript reagent)
(ns swordfish.sortable
(:require [reagent.core :as r]
["react" :as react]
["@dnd-kit/core" :refer [DndContext
closestCenter
KeyboardSensor
PointerSensor
TouchSensor
DragOverlay
useSensor
@prestancedesign
prestancedesign / web.clj
Last active August 24, 2023 15:45
Ring session authentication with Reitit
(ns authexample.web
(:gen-class)
(:require [buddy.auth :refer [authenticated? throw-unauthorized]]
[buddy.auth.backends.session :refer [session-backend]]
[buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
[clojure.java.io :as io]
[compojure.response :refer [render]]
[reitit.ring :as ring]
[ring.adapter.jetty :as jetty]
[ring.middleware.params :refer [wrap-params]]
@Dangercoder
Dangercoder / auth.clj
Created November 21, 2020 18:42
Pedestal JWT authentication interceptor
(ns interceptors.auth
(:require [cheshire.core :as json]
[clojure.spec.alpha :as s]
[clojure.walk :refer [postwalk]]
[clojure.core.async :as a])
(:import (java.net URL)
(com.auth0.jwk GuavaCachedJwkProvider UrlJwkProvider)
(com.auth0.jwt.interfaces RSAKeyProvider ECDSAKeyProvider)
(com.auth0.jwt.algorithms Algorithm)
(com.auth0.jwt JWT)
@digikar99
digikar99 / lisp-resources-digikar-2020.md
Last active November 9, 2023 04:35
If programming is more than just a means of getting things done for you, then Common Lisp is for you!
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active May 31, 2024 23:52
Docker Container Logging using Promtail
@svngoku
svngoku / cri-o.md
Last active March 13, 2023 14:13
cri-o : un bon remplaçant à Docker ?

alt text

CRI-O est une implémentation de la CRI (interface conteneur) de Kubernetes pour permettre l'utilisation de runtimes compatibles avec OCI (Open Container Initiative). C'est une alternative légère à l'utilisation de Docker comme runtime pour kubernetes. Cela permet à Kubernetes d'utiliser n'importe quel runtime compatible OCI comme runtime de conteneur pour l'exécution de pods. Aujourd'hui, il prend en charge runc et Kata Containers en tant que runtimes de conteneur, mais tout runtime conforme à OCI peut être branché en principe.

CRI-O prend en charge les images de conteneur OCI et peut être extrait de tout registre de conteneurs. C'est une alternative légère à l'utilisation de Docker, Moby ou rkt comme runtime pour Kubernetes.

CRI-O fonctionne avec toute image respectant l'OCI. Il fonctionne avec tout registry de conteneur , aussi il fonctionne avec tout OCI Container Runtime : run , gvisor, crun .

>Il fonctionne uniquement avec kuberne

@Lysxia
Lysxia / cont.v
Last active October 28, 2019 09:50
Half-verify alternative version of monad laws
Parameter m : Type -> Type.
Notation c r a := ((a -> m r) -> m r).
Parameter lift : forall r a, m a -> c r a.
Arguments lift {r a}.
Parameter pure : forall a, a -> m a.
Arguments pure {a}.
Definition unlift {a} : c a a -> m a := fun u => u pure.