Skip to content

Instantly share code, notes, and snippets.

Avatar

Stav Alfi stavalfi

View GitHub Profile
View gist:4ad0273f6e41234b3daaea51d14348c1
import WebSocket from 'ws'
function throttle<T>(callback: (message: T) => Promise<void>, interval = 1000): (message: T) => Promise<void> {
return (message: T) => Promise.resolve()
}
interface Message {
type: string
content: string
}
View redux.md

Introduction

The following exercises are for experimenting and learning Redux. Do not use any external library except rxjs (it's optional and recommended).

Documentations:

Ex1

Write your allocator. Allocate a big block of bytes and manage its allocations and deallocations by your self. For example, allocate an array of 20,000 bytes and divide it into 10 cells such that each cell contains 2,000 bytes. The user can allocate and free cells of 2,000 bytes whenever he wants.

@stavalfi
stavalfi / functional-programming-practice.md
Last active Sep 5, 2018
Functional Programming Practice
View functional-programming-practice.md

Functional Programming Practice

All the methods and the documentation are taken from lodash docs


Goal

Manipulating collections using functional and declerative code.