Skip to content

Instantly share code, notes, and snippets.

@khalidx
khalidx / node-typescript-esm.md
Last active May 8, 2024 07:58
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@mrsarm
mrsarm / applogs.sh
Last active January 17, 2019 20:44
applogs.sh: Show logs from AWS Cloud Watch Logs from a given group/stream in a human readable way (see requirements below)
#!/usr/bin/env bash
#
# applogs.sh
#
# Show logs from AWS Cloud Watch Logs from a given group/stream
# in a human readable way.
#
# Requires awscli and jq 1.5+, and if you are using Mac OS also
# needs coreutils installed.
#
@offchan42
offchan42 / Machine Learning Curriculum.md
Last active March 2, 2024 00:02
Machine learning resources and related artificial intelligence concepts.
@rrag
rrag / README.md
Last active March 19, 2024 16:11
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.

@charypar
charypar / proxy.go
Last active August 29, 2015 14:19
Basic cookie injecting proxy in Go
package proxy
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
"time"
)
@carols10cents
carols10cents / ruby-to-rust-cheat-sheet.md
Last active November 24, 2020 23:12
Ruby to Rust Cheat Sheet

Ruby to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in Ruby and Rust so that programmers most comfortable with Ruby can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

Variables

Ruby:

@staltz
staltz / introrx.md
Last active May 9, 2024 07:59
The introduction to Reactive Programming you've been missing
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell