How Node.js Buffer.from(str, 'hex') might be implemented?https://gist.github.com/fuadop/88aaf88f07771c88de10a3eeb70edff11 min read·blog.fuadolatunji.meDec 13, 2024
How might atob() be implemented in JS?https://gist.github.com/fuadop/90f67285e6f250c76aafd698ba7643311 min read·blog.fuadolatunji.meDec 13, 2024
How might window.btoa() be implemented in JS?/** * @param {string} b * @returns {string} */ const btoa = (b) => { let s = ''; const bytes = new Uint8Array(b.split('').map(x => x.charCodeAt(0))); const ALPHABET_TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567...1 min read·blog.fuadolatunji.meDec 13, 2024
How to clear TMUX scrollback buffer with zsh keybindingstmux -V &> /dev/null if [[ $? -eq 0 ]]; then function clear_tmux_scrollback_buffer() { tmux clear-history } zle -N clear_tmux_scrollback_buffer bindkey "^[^L" clear_tmux_scrollback_buffer fi https://github.com/fuadop/zsh-conf...1 min read·blog.fuadolatunji.meDec 13, 2024
Implementing OOP Concepts in GolangA Comprehensive Guide to Object-Oriented Programming (OOP) in Golang5 min read·blog.fuadolatunji.meJan 1, 2023