Skip to content

Instantly share code, notes, and snippets.

View MarkTraceur's full-sized avatar

Mark Holmquist MarkTraceur

View GitHub Profile
@MarkTraceur
MarkTraceur / example.html
Created August 10, 2011 22:13
Random reloader
<html>
<head>
<script type="text/javascript" src="randomreload.js"></script>
</head>
<body>
<h2>Currently implemented:
<script type="text/javascript">
reloading = new reloader(1);
document.write(reloading.r.length);
</script>
@MarkTraceur
MarkTraceur / ANALYSIS
Created August 26, 2011 01:13
Monty Hall Problem -- Statistical Analysis
Strategy 1, which is "stay every time" predictably won 33.33% of the time.
Strategy 2, "switch every time" won 66.67% of the time.
Strategy 3, "switch 33% of the time randomly" won 44.44% of the time.
If you can come up with a strategy that, after immense amounts of trials, is above 66.67% win rate, you may want to contact the makers of Let's Make a Deal, and then contact us to let us know.
DISCLAIMER: I don't think such a strategy exists, so don't lose sleep over finding it.
@MarkTraceur
MarkTraceur / crontab
Created May 30, 2011 00:00 — forked from cnlpete/crontab
minetest init script
# backup every hour, meaning 00:05, 01:05, 02:05, 03:05, 04:05, ... 23:05
5 * * * * /etc/init.d/minetest backup
# clean old files (once a day, at 01:10
10 1 * * * /etc/init.d/minetest clean