This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdlr('mmzsource:raytrace', m => { | |
// SHARED | |
function isEqualNumber(n1, n2, epsilon=Number.EPSILON) { | |
return Math.abs(n1-n2) < epsilon; | |
} | |
function dot(r,c){ | |
console.assert(r.length === c.length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
;; | |
;; This is a babashka script to calculate the duration a github issue spent in | |
;; each github project board column. It will output the results in a few | |
;; different views, where this view is maybe most interesting: | |
;; | |
;; | :iss-title | :iss-html | Total | To do | In Progress | Done | | |
;; |--------------------+--------------+-------+-------+-------------+------+ | |
;; | your issue 1 title | issue 1 html | 100 | 25 | 50 | 25 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.string :as s]) | |
(declare print-maze) | |
;; Maze GENERATION | |
(defn create-grid [rows cols] | |
(vec (repeat rows (vec (repeat cols #{}))))) | |
(defn north-of [[row col]] [(dec row) col]) | |
(defn south-of [[row col]] [(inc row) col]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This is a script to log (and eventually monitor) diskusage on a filesystem. | |
# It will write the disk usage to a logfile. | |
# The logfile will never grow larger than MAX_LINES number of lines. | |
# | |
# The script is 'gnu awk' specific. GNU AWK is available on mac (brew) | |
# and ubuntu (apt-get) as the package 'gawk'. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; Assume leiningen + lein-try plugin installed and working | |
;; | |
;; Fire up a repl with: | |
;; | |
;; lein try incanter "1.5.7" | |
;; | |
(require '[incanter.core :as incanter]) | |
(require '[incanter.charts :as charts]) |
NewerOlder