Skip to content

Instantly share code, notes, and snippets.

View terkelg's full-sized avatar
🔵
Git'n stuff done

Terkel terkelg

🔵
Git'n stuff done
View GitHub Profile
@terkelg
terkelg / DockInfo.swift
Created July 5, 2024 13:18 — forked from wonderbit/DockInfo.swift
Get the Dock position, size and hidden state in a Cocoa app
//
// DockInfo.swift
//
// Created by Wessley Roche on 28/11/2016.
//
import Foundation
enum WBDockPosition: Int {
case bottom = 0
@terkelg
terkelg / pipe.js
Created January 9, 2024 14:31
pipe function Pipe function that allows you to chain multiple operations together by taking a series of functions as arguments and applying them in a specific order to the input.
const surprise = (...fns) => input => fns.reduce(
(acc, fn) => fn(acc), input
)
// -> const formatString = pipe(toUpperCase, removeSpaces, addExclamation)