Skip to content

Instantly share code, notes, and snippets.

View bmakuh's full-sized avatar

Ben Makuh bmakuh

View GitHub Profile
@bmakuh
bmakuh / index.spec.ts
Created February 16, 2025 21:02
Kindle book auto-downloader
/**
* TO USE:
* 1. Save this file
* 1. Add your email and password in the variables below
* 2. Run `npm install @playwright/test`
* 3. Run `npx playwright test --ui index.spec.ts`
*/
import { test, expect, chromium } from "@playwright/test";
@bmakuh
bmakuh / bst.js
Created April 1, 2017 22:01
Binary search tree in JS
class Node {
constructor (val) {
this.value = val
this.left = null
this.right = null
}
static of (val) {
return new Node(val)
}
@bmakuh
bmakuh / urlPropType.js
Created August 25, 2016 17:36
React URL propType
import { curry } from 'lodash'
// isRequired :: Bool => True
export const isRequired = true
// url :: Bool? -> [Prop] -> String -> String -> Either(Error, Nothing)
export const url = curry((
required = false,
props,
propName,

Keybase proof

I hereby claim:

  • I am bmakuh on github.
  • I am bmakuh (https://keybase.io/bmakuh) on keybase.
  • I have a public key ASAFDOjVsQWDL7_tKSq6AX_bFNGxkuMEkaQYM9mWoVWtoAo

To claim this, I am signing this object: