Skip to content

Instantly share code, notes, and snippets.

; before
(fn [{:keys [memory registers] :as system}]
(let [value (memory/load memory
(registers :pc))]
(-> system
(->/in [:registers]
(assoc r value)
(update-in [:pc] inc)))))])
; after
(let [gravity 4
max-velocity 50]
(defrule gravity-pulls-things-down
:on :frame-entered
(r/do entities <- (r/get-in-scene :entities)
faller << (r/get-entities-with #{:velocity :gravity :hitbox})
(r/when (not (e/collides-with? entities
faller
:below))
(r/update-entity faller
#!/bin/bash
if [ -z "$HIPCHAT_TOKEN" ]; then
echo "HipChat token not found. Please specify \$HIPCHAT_TOKEN."
exit 1
fi
if [ -z "$1" ]; then
echo "Please specify a Maven log file to check for vulnerabilities."
exit 1
fi