Skip to content

Instantly share code, notes, and snippets.

View sean-clayton's full-sized avatar
🎷
🐢

Sean Clayton sean-clayton

🎷
🐢
View GitHub Profile
@sean-clayton
sean-clayton / README.md
Last active February 23, 2024 00:18
The Free Public License (FPL)

The Free Public License (FPL)

Goal

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.

Recipe

  1. Copy 0BSD
  2. Replace "software" with "work"
@sean-clayton
sean-clayton / calculate-severity.js
Created October 1, 2021 17:12
Calculate Encounter Severity For Selected Tokens
(function main() {
let errors = [];
const playerTokens = canvas.tokens.controlled.filter((t) => {
return ["character"].includes(t.actor.data.type);
});
const enemyTokens = canvas.tokens.controlled.filter((t) => {
return ["npc"].includes(t.actor.data.type) && t.data.disposition === -1;
});
Title: Meet the Titan
Credit: Written by
Author:
u/Tinheadhero
and u/droctagonapus
Date: 2021-07-02
INT. RED TEAM WAREHOUSE - DAY
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.
#![allow(unused)]
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<()> {
@sean-clayton
sean-clayton / javascript-through-the-years.md
Created March 10, 2021 15:20
JavaScript through the Years

JavaScript through the Years

Brief History Lesson

1995

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

1996

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;
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
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
sean-clayton / MyComponent.js
Last active June 29, 2019 04:06
LiveScript vs JavaScript
import react, {useState, createElement as h} from "react";
// With JSX
function MyComponent() {
const [count, setCount] = useState(0);
return (
<div>
<h1 className="heading" onClick={() => setCount(count + 1)}>
Hello world!