Skip to content

Instantly share code, notes, and snippets.

View mrpotatoes's full-sized avatar

Anahi LibreSinn mrpotatoes

View GitHub Profile
@gvolpe
gvolpe / di-in-fp.md
Last active September 16, 2024 07:18
Dependency Injection in Functional Programming

Dependency Injection in Functional Programming

There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.

A few of the most claimed benefits are the following:

  • Dependency Injection.
  • Life cycle management.
  • Dependency graph rewriting.
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active October 11, 2025 14:25
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@panoply
panoply / equal-width.md
Last active June 18, 2025 05:37
2 column full width table for github markdown

Equal widths

Github markdown full-width 2 column table.

@ruizb
ruizb / advanced-example.md
Last active September 26, 2023 20:21
Reader monad example using fp-ts

The following section is not part of monet.js documentation, but I think it's worth showing how we can compose readers using fp-ts.

Reader composition

Let's say we have the following piece of code:

interface Dependencies {
  logger: { log: (message: string) => void }
 env: 'development' | 'production'
@waynevanson
waynevanson / match-ts.ts
Created April 12, 2020 10:29
A port of switch-case statements for fp-ts.
/**
* A port of switch-case statements for fp-ts.
*
* This could be broken down further and perhaps extended into a new type-class.
* It does the specific job I needed it to.
*
* If you have an abstraction that might help, i'd love to hear about it!
*/
import { array, either, option } from "fp-ts";

So here's the deal. I hyper recommend all-clad but it's expensive and can be a pain in the ass to deal with esp if you're new to cooking. I can help with that. We can do a zoom meeting to do some cooking practice.

Anyhow, you're going to want some cheap pieces that you care less about or are easier to work with.

Almost everything I'm going to


https://tinyurl.com/urow74q

A cast iron skillet is going to be one of your most used items in the kitchen. Cleaning couldn't be easier. Hit it with hot water and you're done. If you gotta do more then you can use

@ozh
ozh / markdown_image_border.md
Created May 14, 2020 16:30
Image border in markdown

Image in markdown: no style possible

![alt-text](https://raw.githubusercontent.com/YOURLS/YOURLS/1.7.9/images/yourls-logo.png)

alt-text

IMG tag accepts no style

<img src="https://raw.githubusercontent.com/YOURLS/YOURLS/1.7.9/images/yourls-logo.png" border="1px solid red"/>