Skip to content

Instantly share code, notes, and snippets.


Pianomanfrazier pianomanfrazier

View GitHub Profile
View index.html
<!DOCTYPE html>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="style.css" type="text/css">
<div id="images"></div>
pianomanfrazier /
Created Nov 3, 2019
Sierpinsky triangles in Rust using Nannou
use nannou::prelude::*;
fn main() {
struct Triangle {
top: Point2<f32>,
left: Point2<f32>,
right: Point2<f32>,
View fixed-column-table.html
<html lang="en">
<title>Fancy HTML Table</title>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale = 1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="main.css">
body {
View tic-tac-toe.p5.js
let w = 150; // width/height of the square
let grid = [
let players = ['X','O']
let game_over = false;
let turn = 0;
title: "Example Pandoc input file"
author: Ryan Frazier
date: June 9, 2019
mainfont: Lora
fontsize: 12pt
linkcolor: red
toc: true
geometry: "left=3cm,right=3cm,top=2cm,bottom=3cm"

+++ paginate_by = 2 sort_by = "date" +++

pianomanfrazier / typography_test.js
Last active Apr 20, 2019
The output of Typography JS after applying a theme
View typography_test.js
const Typography = require('typography');
const theme = require('typography-theme-lincoln');
const typography = new Typography(theme);
pianomanfrazier /
Created Jan 10, 2019
The product export from the database had mangled characters in it. This function grabs all the decimal encoded characters and writes it to an html file for inspection.
import xml.etree.ElementTree as ET
import html
def inspect_escape_characters():
filename = "products.xml"
print(f'XML file: {filename}')
tree = ET.parse(filename)
root = tree.getroot()
all_descriptions = []
count = 0
pianomanfrazier / references.fs
Created Jan 2, 2019
Playing around with Rust ownership
View references.fs
fn main() {
let x = String::from("hello"); // allocate from the heap
let mut y = x;
// let mut y = x.clone(); // clone if you want to use x again
y.push_str(", world! ");
append(&mut y);
append(&mut y);
pianomanfrazier /
Last active Jan 1, 2019
A factorial test in Rust
use std::cmp::Ordering;
use std::io;
const ONE: u64 = 1;
fn main() {
loop {
let mut guess = String::new();