Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View StoneCypher's full-sized avatar

John Haugeland StoneCypher

View GitHub Profile

Stratego for Haters

This document attempts to describe the game Stratego, also known as L'Attaque, which is very closely related to its predecessor Gunjin Shogi ("Japanese Military Chess"). Other variants exist, such as Dover Patrol, Aviation, Tri-Tactics, Do Shou Qi ("jungle,") Lu Zhan Qi ("Land War,") Hai Lu Qong Zhan Qi ("Air Land Sea War,") Game of the Generals, and so forth.

There are notational convention differences between the American and European versions, as well as various published editions, which do not impact the game

@StoneCypher
StoneCypher / learn_peerjs.js
Created May 30, 2021 15:24
Example of `parcelRequire` bug is at line 21, column 890
var learn_peerjs = (function (exports) {
'use strict';
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function commonjsRequire (path) {

How to load WIMB database

mysql -u your_user -p
(when prompted, put in password; now mysql prompt)
create database user_agents;
exit
mysql -u your_user -p user_agents < create-table-whatismybrowser_useragent.sql
mysql -u your_user -p user_agents -e "ALTER TABLE whatismybrowser_useragent DISABLE KEYS;"
mysql -u your_user -p user_agents &lt; whatismybrowser-user-agent-database.sql

How to fix that Puppeteer popup

... what puppeteer popup?

Or, "Do you want to the application Chromium.app to accept incoming network connections?"

This popup can be very annoying when running your testset headed. None of the relevant memes are work appropriate.

Header Header Right
Cell Cell $10
Cell Cell $20
@StoneCypher
StoneCypher / Learning JS.md
Created March 18, 2018 18:48 — forked from Ehawk82/LearningJS.md
(Jason's) experience in learning JS

Scope & Timeline. Troubleshooting takes time and it's painful when the problem is because of where something is written in respect to other things. "Return functions". I wish i learned to do this earlier. Instead of writing "document.get[thing]" over and over again sucks. So creating a return function in my global object is a great timesaver... something like UI.bySelect("#tag") and UI.byTag("body"). I believe this is also a good way to learn how to use parameters Parameters. Specifically about the scope of where a variable is named. I found that there are times where i'll use "x", "y" for a generic variable to pass as a parameter. This means the previous function will try to pass their variable in those spots. This is something to pay attention to when using more than two parameters Using setTimeout() to delay a className change. This is something that i spent a lot of time and code on to do things, only to find out that a simple timeout can delay a change momentarity. This is important when l

Citing Huxley's Collected Essays Vol 5

When I reached intellectual maturity and began to ask myself whether I was an atheist, a theist, or a pantheist; a materialist or an idealist; a Christian or a freethinker; I found that the more I learned and reflected, the less ready was the answer; until, at last, I came to the conclusion that I had neither art nor part with any of these denominations, except the last. The one thing in which most of these good people were agreed was the one thing in which I differed from them. They were quite sure they had attained a certain "gnosis,"—had, more or less successfully, solved the problem of existence; while I was quite sure I had not, and had a pretty strong conviction that the problem was insoluble. And, with Hume and Kant on my side, I could not think myself presumptuous in holding fast by that opinion. Like Dante,

Nel mezzo del cammin di nostra vita

Mi ritrovai per una selva oscura,

but, unlike Dante,

machine_name: "Raganwald's example";
machine_source: http://raganwald.com/2018/02/23/forde.html ;
start_states: open;
initial_data: { balance: 0 };
open 'deposit' { onfollow: `${(action, data) => ((data.balance += action.amount), data)}`; } -> open;
open 'withdraw' { onfollow: `${(action, data) => ((data.balance -= action.amount), data)}`; } -> open;
@StoneCypher
StoneCypher / ltdf.html
Created January 3, 2018 22:34
learn the debugger francisco
<!doctype html><html><head><script type="text/javascript">
const Num1 = 500;
const Num2 = 0500; // this is the bug, but let's say that you don't know about octal
const finalNum = Num1 + Num2;
window.onload = () =>
document.body.innerHTML = `Should print 1000: <tt>${finalNum}</tt>`;
@StoneCypher
StoneCypher / Toy react bootstrap from CDN.html
Last active January 8, 2018 05:57
Toy react bootstrap from CDN for Francisco
<!doctype html>
<html>
<head>
<script src="https://fb.me/react-15.0.0.js"></script>
<script src="https://fb.me/react-dom-15.0.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
<script type="text/babel">