Skip to content

Instantly share code, notes, and snippets.

@mtwomey
mtwomey / dummySim.js
Created August 21, 2022 15:10
Mage Night Dummy Deck Simulation
"use strict";
const { randomInt } = require("crypto");
const log = false;
for (let i = 1; i <= 10; i++) {
console.log(`Running round: ${i}`);
runRound(i, 10000000);
}
@mtwomey
mtwomey / occur-from-search.el
Last active January 30, 2023 21:16
Quickly run occur from your previous search regex
(defun occur-from-search ()
"Runs occur on the regex used in the last '/' search. This is useful for capturing
all the matches (just the matches, not the whole lines) into the occur buffer so
you can do something with them.
Note: Assumes evil search, so you may need to tweak for your needs."
(interactive)
(let ((search-pattern evil-ex-search-pattern))
(if search-pattern
(let ((capture-type (if (zerop (regexp-opt-depth (nth 0 search-pattern)))

Keybase proof

I hereby claim:

  • I am mtwomey on github.
  • I am mtwomey (https://keybase.io/mtwomey) on keybase.
  • I have a public key ASClnOoSo-5qXhw_RDwutwfZXJrO-9NHwq9RQIERwTHPNwo

To claim this, I am signing this object: