Skip to content

Instantly share code, notes, and snippets.

View StevenClontz's full-sized avatar

Steven Clontz StevenClontz

View GitHub Profile
@StevenClontz
StevenClontz / output.html
Last active November 15, 2023 20:35
Rob vs Steven sage output
<!DOCTYPE html>
<!-- Steven's version -->
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name=viewport content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body { margin: 0px; overflow: hidden; }
ipurcbasefc for tbe Sltbrars of
be TUniverait? of {Toronto
out of tbe proceeds of tbe fun&
bequeatbefc bp

Use an appropriate substitution and evaluate the definite integral

$$I = \int_1^e \frac{1}{x(\ln x + 1)^2} dx$$

@StevenClontz
StevenClontz / post.md
Last active August 10, 2023 21:03
blog post draft: balancing encouragement of on-time submissions with grace for work submitted late

If you're reading this, I probably don't need to convince you of the value of having grace for late submissions, both ethically and pedagogically, but if I do, I'll let David and Robert take the wheel: GradingForGrowth.com

That said, a common concern folks share with me: since it's still better for students to not leave all their required work for the last minutes of a course, how can I balance this grace with encouragement of sticking to the pace of the course as best as a student can? Indeed, I personally can attest to my early days of alternative grading where I goofed on this a bit, and found myself in the final week of a course with over a dozen students lined out my office door hoping to reassess particular learning outcomes from throughout the semester. But I've designed enough bad courses, puzzles, and games to know that coming up with a policy that tries to guess how many "tries" a student should be able to have at demonstrating their learning is a tough, if not imp

@StevenClontz
StevenClontz / simplified-castle-panic-rules.md
Last active January 15, 2022 19:28
Simplified castle panic (for 3yo)

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 December 16, 2021 22:33
Redirecting a PreTeXt book
# 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")
@StevenClontz
StevenClontz / .bash_prompt
Last active September 2, 2020 17:12
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 December 10, 2019 23:52
PreTeXt exercise made up syntax
<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 September 20, 2018 21:13
git cheatsheet for LaTeX projects
# create a file with this exact text to ignore build files
*.aux
*.fdb_latexmk
*.fls
*.log
*.synctex.gz
@StevenClontz
StevenClontz / gist:1eb76f761b9114858238dd62d21740a5
Last active January 18, 2018 21:33 — forked from wrburgess/gist:2187164
Setting up a Rails has_many :through relationship with meaningful relationship table #rails #activerecord #relations

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