Skip to content

Instantly share code, notes, and snippets.

View jchild3rs's full-sized avatar

James Childers jchild3rs

View GitHub Profile
import "buffer";
import P from "parsimmon";
import { NextRequest, NextResponse } from "next/server";
/** State and city tokens are just letters */
const dashToken = P.string("-");
const slashToken = P.string("/");
const zipPrefixToken = P.regex(/zip-/i);
const zipToken = P.regex(/[\d]+/i);
const poiToken = P.string("/p");
@jchild3rs
jchild3rs / fizzbuzz.rs
Created September 20, 2023 01:25
rust fizz buzz
fn main() {
fizzbuzz(15);
}
fn fizzbuzz(n: i32) {
for i in 1..n {
if i % 3 == 0 && i % 5 == 0 {
println!("FizzBuzz");
} else if i % 3 == 0 {
println!("Fizz");