Skip to content

Instantly share code, notes, and snippets.

@jogo3000
jogo3000 / my-disable-mouse.el
Created December 6, 2020 06:28
Temporarily disables mouse when I'm typing
;; Disable mouse on typing
(defvar jogo3000/mouse-disabled nil)
(use-package disable-mouse)
(defun jogo3000/disable-mouse ()
"Disable mouse."
(setq jogo3000/mouse-disabled t)
(global-disable-mouse-mode t))
(defun jogo3000/enable-mouse ()
@jogo3000
jogo3000 / vdottii.clj
Last active July 12, 2024 10:07
Some formulas for finding equivalent performances based on a reference
;; Adaptations of equations found in Jack Daniels - Daniels' Running Formula in clojure
(import (java.lang Math))
(defn %VOmax
"Returns the percentage of VOmax a runner can sustain for the given duration"
[seconds]
(let [mins (/ seconds 60)]
(+ 0.8
(* 0.1894393
(Math/exp (* -0.012778 mins)))
@jogo3000
jogo3000 / tcx_to_csv_basex.xqy
Created January 1, 2017 05:20
BaseX xQuery for exporting a database of TCX moves to a csv file
(:
Outputs all Trackpoints in the BaseX database 'moves' in CSV format with columns in following order
ID - Activity identifier
SPORT - Sport (Running|Biking|Other)
TIMESTAMP - Timestamp as UNIX epoch
LAT - Latitude as degrees
LONG - Longitude as degrees
HR - Heart rate as BPM (integer)
ALT - Altitude as float
CAD - Cadence as integer