Skip to content

Instantly share code, notes, and snippets.

View yunyu's full-sized avatar
😎

Yunyu Lin yunyu

😎
View GitHub Profile
@artlbv
artlbv / replacePDFtext.sh
Last active July 28, 2023 04:46
Batch replace text in PDF
#!/bin/bash
#!-----------------------------------
#! Replace "oldtext" with "newtext"
#! inside all pdf files in the directory.
@Avaq
Avaq / combinators.js
Last active September 21, 2024 01:18
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))