Skip to content

Instantly share code, notes, and snippets.

View pathologicalhandwaving's full-sized avatar
:shipit:
If you are the smartest person in the room, run TF out of that room

UnMary pathologicalhandwaving

:shipit:
If you are the smartest person in the room, run TF out of that room
View GitHub Profile
@pathologicalhandwaving
pathologicalhandwaving / mersenne-twister.js
Last active November 23, 2021 15:48 — forked from robbinhan/mersenne-twister.js
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
#!/usr/bin/env ruby -rjcode -Ku
# TaskPaper to Markdown converter
# Usage: tp2md.rb filename.taskpaper > output.md
require 'ftools'
infile = ARGV[0]
title = File.basename(infile,'.taskpaper').upcase
output = "# #{title} #\n\n"
prevlevel = 0
begin
@pathologicalhandwaving
pathologicalhandwaving / chgext.sh
Created February 20, 2025 09:59 — forked from ttscoff/chgext.sh
One-line Bash command to change the extensions of all files in a directory
# batch change extension
chgext() {
for file in *.$1 ; do mv $file `echo $file | sed "s/\(.*\.\)$1/\1$2/"` ; done
}