Skip to content

Instantly share code, notes, and snippets.


Sean Clayton sean-clayton

View GitHub Profile
sean-clayton /
Last active Jan 4, 2022
The Free Public License (FPL)

The Free Public License (FPL)


A professional-environment-friendly license that is Public Domain Equivalent (Like CC0, Unlicense, WTFPL, and 0BSD), but with the distinction of not being specific to software.


  1. Copy 0BSD
  2. Replace "software" with "work"
sean-clayton / calculate-severity.js
Created Oct 1, 2021
Calculate Encounter Severity For Selected Tokens
View calculate-severity.js
(function main() {
let errors = [];
const playerTokens = canvas.tokens.controlled.filter((t) => {
return ["character"].includes(;
const enemyTokens = canvas.tokens.controlled.filter((t) => {
return ["npc"].includes( && === -1;
View meet-the-titan.fountain
Title: Meet the Titan
Credit: Written by
and u/droctagonapus
Date: 2021-07-02
A large gun, the Sweet Business, is in plain view. THE TITAN, holding the gun and his face out of frame, walks towards the camera and places it on a cardboard box. He sits down on a chair behind the box, face in frame. He looks into the camera, knowing we are watching.
use std::env;
use std::fs::File;
use std::io::prelude::*;
use std::io::Read;
use std::io::{stdout, Error, ErrorKind, Write};
const LICENSE_DIRECTORY: &str = "licenses";
fn main() -> std::io::Result<()> {

JavaScript through the Years

Brief History Lesson


Brenden Eich creates JavaScript in 10 days at Netscape and it is released in December.


View PlayerPreferences.cs
using Godot;
public class PlayerPreferences : Node
private static ConfigFile Cfg = new ConfigFile();
[Export] private static string Filename = "player_preferences.cfg";
private static string Filepath = "user://" + Filename;
View genesys-roll-spending.csv
Result Effect
1 Threat Your current weapon gains the Limited Ammo 3 item quality (CRB 88) until you acquire more ammo
2 Threat Your current weapon gains the Limited Ammo 1 item quality (CRB 88) until you acquire more ammo
3 Threat You gain the Disoriented status effect (CRB 114)
3 Threat You gain the Staggered status effect (CRB 114)
1 Despair Your current weapon is out of ammo and all weapons that use the same ammunition type gain the Limited Ammo 1 item quality (CRB 88) until you acquire more ammo
1 Advantage Activate a weapon quality
1 Advantage Recover 1 strain (repeatable)
2 Advantage Gain an extra skill check (CRB 101) if you have already used one
3 Advantage Reduce your current Staggered status effect (CRB 114) by 1 turn
View 0
type maybeString = string option
let myMaybeString: maybeString = Some "howdy"
let myString =
match myMaybeString with
| Some s -> s
| None -> ""
let useTheme = () => {
open ReactResponsiveRe;
open Dom.Storage;
open AppStyles;
open AppStyles.ThemeNames;
open AppStyles.ThemeStore;
let prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
let systemTheme =
sean-clayton / MyComponent.js
Last active Jun 29, 2019
LiveScript vs JavaScript
View MyComponent.js
import react, {useState, createElement as h} from "react";
// With JSX
function MyComponent() {
const [count, setCount] = useState(0);
return (
<h1 className="heading" onClick={() => setCount(count + 1)}>
Hello world!