Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Clontz StevenClontz

View GitHub Profile
View mobydick.txt
ipurcbasefc for tbe Sltbrars of
be TUniverait? of {Toronto
out of tbe proceeds of tbe fun&
bequeatbefc bp
@StevenClontz
StevenClontz / simplified-castle-panic-rules.md
Last active Jan 15, 2022
Simplified castle panic (for 3yo)
View simplified-castle-panic-rules.md

Setup

  • Place six towers and six walls in the center of the board.
  • Find 5 Goblin tokens, 3 Orc tokens, and 2 Troll tokens. Return the other tokens to the box.
  • Shuffle the tokens and place them facedown next to the board.
  • Roll the die. Ignoring the Forest ring, place a random token face-up on the outermost ring of that die's wedge, pointing the highest number corner towards the center (its hit points).
    • If the wedge is full, re-roll the die and try again.
  • Create a shuffled deck of only Swordsman, Knight, Archer, Hero, and Barbarian cards. Return the other cards to the box.
@StevenClontz
StevenClontz / redirect.py
Created Dec 16, 2021
Redirecting a PreTeXt book
View redirect.py
# FIRST, copy (not move) your HTML into the desired directory you wish to redirect to using your filesystem
# you can delete any non-HTML files at the original location, at least, only HTML can be redirected
import os
# current path to PreTeXt-generated HTML from working directory
current = os.path.join("docs")
# relative path to redirected HTML from current, default assumes move from ./docs to ./docs/archive-2021
redirect = os.path.join("archive-2021")
View .bash_prompt
# set colors for prompt
RED="\[\033[0;31m\]"
YELLOW="\[\033[1;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[1;34m\]"
MAGENTA="\[\033[1;35m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
@StevenClontz
StevenClontz / imaginary-pretext-mc.xml
Created Dec 10, 2019
PreTeXt exercise made up syntax
View imaginary-pretext-mc.xml
<exercise>
<statement>
<p>
Which of these numbers are even?
</p>
<multiple-choice select="many">
<choice correct="true"><m>-4</m></choice>
<choice><m>-1</m></choice>
<choice correct="true"><m>0</m></choice>
<choice><m>5</m></choice>
@StevenClontz
StevenClontz / .gitignore
Last active Sep 20, 2018
git cheatsheet for LaTeX projects
View .gitignore
# create a file with this exact text to ignore build files
*.aux
*.fdb_latexmk
*.fls
*.log
*.synctex.gz
@StevenClontz
StevenClontz / gist:1eb76f761b9114858238dd62d21740a5
Last active Jan 18, 2018 — forked from wrburgess/gist:2187164
Setting up a Rails has_many :through relationship with meaningful relationship table #rails #activerecord #relations
View gist:1eb76f761b9114858238dd62d21740a5

Create Models

Create tables:

  • bin/rails g model Location name:string
  • bin/rails g model User name:string
  • bin/rails g model Checkin

Run migration:

  • bin/rails db:migrate
@StevenClontz
StevenClontz / README.md
Last active May 23, 2016
MaPP HSC17 Call for Puzzle Designers
View README.md

MaPP High School Challenge '17

Thank you for your interest in designing a puzzle for Mathematical Puzzle Program's (MaPP) High School Challenge '17 (HSC17)! We provide our mathematical puzzlehunt competition materials to campuses across the country without cost as part of our mission of promoting the fun of mathematical problem solving. Your contributions are what make this possible.

Please read this short document outlining what we need from our volunteer

@StevenClontz
StevenClontz / older_bash_prompt.sh
Last active Apr 6, 2016 — forked from insin/bash_prompt.sh
Older bash prompt
View older_bash_prompt.sh
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
View README.md

ROT Pairs

Finds a list of tuples, each of which is a triple (word1, word2, n) where word1 and word2 are Scrabble words of length 4, and n is a number such that word2 is a ROT-n cypher of word1.

Word list

You'll need your own Scrabble word list. I used SOWPODS, which I found here: Save it as words.txt to use the script.