Skip to content

Instantly share code, notes, and snippets.

View AlgusDark's full-sized avatar
🌯

Carlos Pérez Gutiérrez AlgusDark

🌯
View GitHub Profile
class PathMe {
moves: string[] = [];
constructor() {
this.moves = [];
return this;
}
moveTo(x: number, y: number) {
@AlgusDark
AlgusDark / .zshrc
Created February 6, 2023 07:21 — forked from bashbunni/.zshrc
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@AlgusDark
AlgusDark / types.ts
Created January 14, 2021 05:22 — forked from ClickerMonkey/types.ts
Typescript Helper Types
// when T is any|unknown, Y is returned, otherwise N
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N;
// when T is never, Y is returned, otherwise N
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
// when T is a tuple, Y is returned, otherwise N
// valid tuples = [string], [string, boolean],
// invalid tuples = [], string[], (string | number)[]