Skip to content

Instantly share code, notes, and snippets.


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


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



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 /
Last active Sep 5, 2018
Functional Programming Practice

Functional Programming Practice

All the methods and the documentation are taken from lodash docs


Manipulating collections using functional and declerative code.