Skip to content

Instantly share code, notes, and snippets.

View thehypergraph's full-sized avatar
💭
Sit rep normal

Ronald Jordan thehypergraph

💭
Sit rep normal
View GitHub Profile
@thehypergraph
thehypergraph / christmas-tree.ts
Created December 29, 2024 10:03
Christmas Tree
function christmasTree(w: number, ch: string, sep: string, isEmoji: boolean = false) {
if (w % 2 !== 0) {
console.log('Please pick an even number for the height of the tree.')
return
}
const spacingMultiplier = isEmoji ? 2 : 1 // Emoji characters are roughly 2 spaces wide
for (let i = 1; i < w; i += 2) {
const spacing = (w - i - 1) / 2
@thehypergraph
thehypergraph / .js
Created July 20, 2023 01:38
Node.Js Class Iterator
[Symbol.iterator]() {
let index = 0
return {
next: () => {
if (index <= this.items.length) {
const res = { value: this.items[index], done: false }
index = index + 1
return res
@thehypergraph
thehypergraph / .zshrc
Last active June 15, 2023 17:10
My .zshrc
# ZSH Shell
export ZSH=/Users/ronald/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git extract heroku pass)
fpath+=~/.zfunc
autoload -U compinit && compinit
source $ZSH/oh-my-zsh.sh
# Base