Skip to content

Instantly share code, notes, and snippets.

View enricopolanski's full-sized avatar

Enrico Polanski enricopolanski

View GitHub Profile
@nth-commit
nth-commit / VariadicPipe.ts
Last active September 29, 2022 21:47
Function composition in TypeScript 4.1 (on top of ixjs's pipe)
import { OperatorFunction } from 'ix/interfaces';
import { pipe } from 'ix/iterable';
import { map } from 'ix/iterable/operators';
/**
* Creates a new type which is the first element of a non-empty tuple type.
*
* @example type T = Head<[string, number, Object]>; // string
*/
export type Head<Ts extends [any, ...any[]]> = Ts extends [infer T, ...any[]] ? T : never;
@graninas
graninas / On_hiring_haskellers.md
Last active March 25, 2023 16:49
On hiring Haskellers

On hiring Haskellers

Recently I noticed the number of the same two questions being asked again and again on different Haskell resources. The questions were “How to get a Haskell job” and “Why is it so hard to find Haskellers?” Although these two are coming from the opposite sides of the hiring process, the answer is really just one. There is a single reason, a single core problem that causes difficulties of hiring and being hired in the Haskell community, and we should clearly articulate this problem if we want to increase the Haskell adoption.

We all know that there are many people wishing to get a Haskell job. And a visible increase of Haskell jobs looks like there should be a high demand for Haskellers. The Haskell community has also grown like crazy past years. But still, why is it so difficult to hire and to be hired? Why can’t companies just hire any single person who demonstrates a deep knowledge of Haskell in blog posts, in chats, on forums, and in talks? And why do Haskell companies avoid hirin

@przemkow
przemkow / jest.config.js
Last active July 29, 2021 10:52
Jest transform svg with vue-jest@4
modules.export = {
...,
transform: {
".*\\.(svg)$": "<rootDir>/svg-transform.js",
},
}
@Mecanik
Mecanik / Utils.ts
Last active November 5, 2024 06:59
Send or Delete bulk data to Cloudflare Workers KV (TypeScript)
export default class Utils {
/**
* Delete items in bulk from Cloudflare KV Storage
* This assumes you have defined your ENV_ variables using wrangler secrets
* @param {namespace} The namespace binding you defined for your script
*/
static async deleteInBulk(namespace): Promise<Boolean> {
const delete_endpoint =
"https://api.cloudflare.com/client/v4/accounts/" +
EN_ACC_ID +
@nat-418
nat-418 / why-tcl.md
Last active April 1, 2024 03:23
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages: