Skip to content

Instantly share code, notes, and snippets.

View kerryboyko's full-sized avatar

Kerry Boyko kerryboyko

  • United States
View GitHub Profile
@kerryboyko
kerryboyko / floatBuzz.spec.ts
Created September 17, 2023 21:45
FloatBuzz
import { floatBuzz, naiveFloatBuzz, coerceFloatToRatio, Ratio} from './floatBuzz';
test('NaiveFloatBuzz', () => {
expect(naiveFloatBuzz(0.3)).toBe("Float");
expect(naiveFloatBuzz(0.6)).toBe("Float");
expect(naiveFloatBuzz(0.9)).not.toBe("Float"); // this will fail using the naive approach.
expect(naiveFloatBuzz(1.2)).toBe("Float");
expect(naiveFloatBuzz(0.5)).toBe("Buzz");
expect(naiveFloatBuzz(1.0)).toBe("Buzz");
@kerryboyko
kerryboyko / Taskfile.ts
Created March 18, 2021 03:24
Taskfile.ts for Deno
/* To use Taskfile, it's recommended that you alias this to your shell:
Unix: alias deno-task='deno run --allow-run $(git rev-parse --show-toplevel)/Taskfile.ts'
Windows PowerShell: Set-Alias -Name deno-task -Value deno run --allow-run ./Taskfile.ts
Thanks to https://dev.to/vonheikemen/a-simple-way-to-replace-npm-scripts-in-deno-4j0g for this idea.
*/
type DenoTask = (...args: any[]) => Promise<Deno.ProcessStatus>
function run(
extended from /u/irepostoldmemes on imgur, and with apologies to the Butthole Surfers.
---
Mark infected Sharon.
Sharon got Sharice.
They were sharin' Sharon's Covids
'Cause it's such a quick disease.
Mikey has Pneumonia scars,
Bobby got shot by the racists,
@kerryboyko
kerryboyko / looksay.js
Created January 24, 2018 19:18
Would you like to build a function?
// Hey Anna, wanna write a function that returns the output for a look and say sequence: https://en.wikipedia.org/wiki/Look-and-say_sequence
function lookAndSaySequence(n) {
// would you like to build a function?
// a function that returns a striiiing.
var lookSay = function(strNum) {
var sayArray = [];
var repeats = 1; // we check to see how many nums
var digit = 0; // and say the num
@kerryboyko
kerryboyko / README.md
Last active April 26, 2023 16:08
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.